mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make View Managers lazy
Summary: Today, View Managers are all initialized as soon as we start up the app. Making them lazy, so that we only intantiate them when they are really needed Differential Revision: D17329940 fbshipit-source-id: 821bf121f04d58c7b871c7923fed81d8c735f8b4
This commit is contained in:
committed by
Facebook Github Bot
parent
91e35b24e3
commit
3e02f1f929
+1
-1
@@ -24,7 +24,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
/** View manager for {@link ReactCheckBox} components. */
|
||||
public class ReactCheckBoxManager extends SimpleViewManager<ReactCheckBox> {
|
||||
|
||||
private static final String REACT_CLASS = "AndroidCheckBox";
|
||||
public static final String REACT_CLASS = "AndroidCheckBox";
|
||||
|
||||
private static final CompoundButton.OnCheckedChangeListener ON_CHECKED_CHANGE_LISTENER =
|
||||
new CompoundButton.OnCheckedChangeListener() {
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import java.util.Map;
|
||||
@ReactModule(name = ReactDrawerLayoutManager.REACT_CLASS)
|
||||
public class ReactDrawerLayoutManager extends ViewGroupManager<ReactDrawerLayout> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidDrawerLayout";
|
||||
public static final String REACT_CLASS = "AndroidDrawerLayout";
|
||||
|
||||
public static final int OPEN_DRAWER = 1;
|
||||
public static final int CLOSE_DRAWER = 2;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ import java.util.Map;
|
||||
@ReactModule(name = ReactTextInputManager.REACT_CLASS)
|
||||
public class ReactTextInputManager extends BaseViewManager<ReactEditText, LayoutShadowNode> {
|
||||
public static final String TAG = ReactTextInputManager.class.getSimpleName();
|
||||
protected static final String REACT_CLASS = "AndroidTextInput";
|
||||
public static final String REACT_CLASS = "AndroidTextInput";
|
||||
|
||||
private static final int[] SPACING_TYPES = {
|
||||
Spacing.ALL, Spacing.LEFT, Spacing.RIGHT, Spacing.TOP, Spacing.BOTTOM,
|
||||
|
||||
Reference in New Issue
Block a user