mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 14:54:58 +08:00
BREAKING - Change measure() api to remove need for MeasureOutput allocation
Reviewed By: splhack Differential Revision: D4081037 fbshipit-source-id: 28adbcdd160cbd3f59a0fdd4b9f1200ae18678f1
This commit is contained in:
committed by
Facebook Github Bot
parent
bafc6ddbd1
commit
553f4371e0
@@ -50,13 +50,12 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void measure(
|
||||
public long measure(
|
||||
CSSNodeAPI node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode,
|
||||
MeasureOutput measureOutput) {
|
||||
CSSMeasureMode heightMode) {
|
||||
if (!mMeasured) {
|
||||
SeekBar reactSlider = new ReactSlider(getThemedContext(), null, STYLE);
|
||||
final int spec = View.MeasureSpec.makeMeasureSpec(
|
||||
@@ -67,8 +66,8 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {
|
||||
mHeight = reactSlider.getMeasuredHeight();
|
||||
mMeasured = true;
|
||||
}
|
||||
measureOutput.width = mWidth;
|
||||
measureOutput.height = mHeight;
|
||||
|
||||
return MeasureOutput.make(mWidth, mHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user