mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-30 22:12:42 +08:00
Import css-layout measure mode changes from pull request #163
Reviewed By: lucasr Differential Revision: D3167760 fb-gh-sync-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b fbshipit-source-id: f4f13bcb09a2d8b2db2764bd31fa8cbd8edb484b
This commit is contained in:
committed by
Facebook Github Bot 4
parent
2039be9d32
commit
303428ea28
@@ -14,6 +14,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.CSSNode;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
@@ -44,7 +45,13 @@ public class ReactSwitchManager extends SimpleViewManager<ReactSwitch> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void measure(CSSNode node, float width, float height, MeasureOutput measureOutput) {
|
||||
public void measure(
|
||||
CSSNode node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode,
|
||||
MeasureOutput measureOutput) {
|
||||
if (!mMeasured) {
|
||||
// Create a switch with the default config and measure it; since we don't (currently)
|
||||
// support setting custom switch text, this is fine, as all switches will measure the same
|
||||
|
||||
Reference in New Issue
Block a user