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:
Ram N
2019-09-12 11:48:14 -07:00
committed by Facebook Github Bot
parent 91e35b24e3
commit 3e02f1f929
3 changed files with 3 additions and 3 deletions
@@ -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() {
@@ -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;
@@ -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,