Java Code Examples for com.facebook.react.uimanager.ViewManager

The following are top voted examples for showing how to use com.facebook.react.uimanager.ViewManager. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: RNLearn_Project1   File: ReactInstanceManager.java   Source Code and License 6 votes vote down vote up
/**
 * Uses configured {@link ReactPackage} instances to create all view managers.
 */
public List<ViewManager> createAllViewManagers(
    ReactApplicationContext catalystApplicationContext) {
  ReactMarker.logMarker(CREATE_VIEW_MANAGERS_START);
  Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createAllViewManagers");
  try {
    List<ViewManager> allViewManagers = new ArrayList<>();
    for (ReactPackage reactPackage : mPackages) {
      allViewManagers.addAll(reactPackage.createViewManagers(catalystApplicationContext));
    }
    return allViewManagers;
  } finally {
    Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
    ReactMarker.logMarker(CREATE_VIEW_MANAGERS_END);
  }
}
 
Example 2
Project: RNLearn_Project1   File: CatalystNativeJavaToJSReturnValuesTestCase.java   Source Code and License 6 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  final UIManagerModule mUIManager = new UIManagerModule(
      getContext(),
      new ArrayList<ViewManager>(),
      new UIImplementationProvider(),
      false);

  mAssertModule = new AssertModule();

  mInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mAssertModule)
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(TestJavaToJSReturnValuesModule.class)
      .addNativeModule(mUIManager)
      .addNativeModule(new TestModule())
      .build();
}
 
Example 3
Project: RNLearn_Project1   File: CoreModulesPackage.java   Source Code and License 6 votes vote down vote up
private UIManagerModule createUIManager(ReactApplicationContext reactContext) {
  ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_START);
  Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createUIManagerModule");
  try {
    List<ViewManager> viewManagersList = mReactInstanceManager.createAllViewManagers(
      reactContext);
    return new UIManagerModule(
      reactContext,
      viewManagersList,
      mUIImplementationProvider,
      mLazyViewManagersEnabled);
  } finally {
    Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
    ReactMarker.logMarker(CREATE_UI_MANAGER_MODULE_END);
  }
}
 
Example 4
Project: RNLearn_Project1   File: CatalystNativeJavaToJSReturnValuesTestCase.java   Source Code and License 6 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  final UIManagerModule mUIManager = new UIManagerModule(
      getContext(),
      new ArrayList<ViewManager>(),
      new UIImplementationProvider(),
      false);

  mAssertModule = new AssertModule();

  mInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mAssertModule)
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(TestJavaToJSReturnValuesModule.class)
      .addNativeModule(mUIManager)
      .addNativeModule(new TestModule())
      .build();
}
 
Example 5
Project: RNLearn_Project1   File: ReactInstanceManager.java   Source Code and License 6 votes vote down vote up
/**
 * Uses configured {@link ReactPackage} instances to create all view managers.
 */
public List<ViewManager> createAllViewManagers(
    ReactApplicationContext catalystApplicationContext) {
  ReactMarker.logMarker(CREATE_VIEW_MANAGERS_START);
  Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createAllViewManagers");
  try {
    List<ViewManager> allViewManagers = new ArrayList<>();
    for (ReactPackage reactPackage : mPackages) {
      allViewManagers.addAll(reactPackage.createViewManagers(catalystApplicationContext));
    }
    return allViewManagers;
  } finally {
    Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
    ReactMarker.logMarker(CREATE_VIEW_MANAGERS_END);
  }
}
 
Example 6
Project: RNLearn_Project1   File: FlatUIImplementationProvider.java   Source Code and License 5 votes vote down vote up
@Override
public FlatUIImplementation createUIImplementation(
    ReactApplicationContext reactContext,
    List<ViewManager> viewManagers,
    EventDispatcher eventDispatcher) {
  return FlatUIImplementation.createInstance(
    reactContext,
    viewManagers,
    eventDispatcher,
    mMemoryImprovementEnabled);
}
 
Example 7
Project: RNLearn_Project1   File: CatalystUIManagerTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(
      new ReactViewManager(),
      new ReactTextViewManager(),
      new ReactRawTextManager());
  uiManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(new Runnable() {
    @Override
    public void run() {
      uiManager.onHostResume();
    }
  });
  waitForIdleSync();

  jsModule = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(uiManager)
      .addNativeModule(new AndroidInfoModule())
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(UIManagerTestModule.class)
      .build()
      .getJSModule(UIManagerTestModule.class);
}
 
Example 8
Project: RNLearn_Project1   File: LazyReactPackage.java   Source Code and License 5 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
  List<ModuleSpec> viewManagerModuleSpecs = getViewManagers(reactContext);
  if (viewManagerModuleSpecs == null || viewManagerModuleSpecs.isEmpty()) {
    return Collections.emptyList();
  }

  List<ViewManager> viewManagers = new ArrayList<>();
  for (ModuleSpec moduleSpec : viewManagerModuleSpecs) {
    viewManagers.add((ViewManager) moduleSpec.getProvider().get());
  }
  return viewManagers;
}
 
Example 9
Project: RNLearn_Project1   File: ViewRenderingTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(new ReactViewManager());
  final UIManagerModule uiManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          uiManager.onHostResume();
        }
      });
  waitForIdleSync();

  mCatalystInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(uiManager)
      .addNativeModule(new AndroidInfoModule())
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(ViewRenderingTestModule.class)
      .build();

  mRootView = new ReactRootView(getContext());
  mRootTag = uiManager.addMeasuredRootView(mRootView);
}
 
Example 10
Project: RNLearn_Project1   File: FlatUIImplementation.java   Source Code and License 5 votes vote down vote up
@Override
protected ReactShadowNode createShadowNode(String className) {
  ReactShadowNode cssNode = super.createShadowNode(className);
  if (cssNode instanceof FlatShadowNode || cssNode.isVirtual()) {
    return cssNode;
  }

  ViewManager viewManager = resolveViewManager(className);
  return new NativeViewWrapper(viewManager);
}
 
Example 11
Project: RNLearn_Project1   File: FlatUIImplementation.java   Source Code and License 5 votes vote down vote up
private static @Nullable RCTImageViewManager findRCTImageManager(List<ViewManager> viewManagers) {
  for (int i = 0, size = viewManagers.size(); i != size; ++i) {
    if (viewManagers.get(i) instanceof RCTImageViewManager) {
      return (RCTImageViewManager) viewManagers.get(i);
    }
  }

  return null;
}
 
Example 12
Project: RNLearn_Project1   File: JSLocaleTest.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(
      new ReactViewManager());
  final UIManagerModule mUIManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

  mStringRecordingModule = new StringRecordingModule();
  mInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mStringRecordingModule)
      .addNativeModule(mUIManager)
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(TestJSLocaleModule.class)
      .build();
}
 
Example 13
Project: RNLearn_Project1   File: CatalystNativeJSToJavaParametersTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(
      new ReactViewManager());
  final UIManagerModule mUIManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

  mRecordingTestModule = new RecordingTestModule();
  mCatalystInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mRecordingTestModule)
      .addNativeModule(new AndroidInfoModule())
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addNativeModule(mUIManager)
      .addJSModule(TestJSToJavaParametersModule.class)
      .build();
}
 
Example 14
Project: RNLearn_Project1   File: CatalystNativeJavaToJSArgumentsTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(
      new ReactViewManager());
  final UIManagerModule mUIManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

  mAssertModule = new AssertModule();

  mInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mAssertModule)
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(TestJavaToJSArgumentsModule.class)
      .addNativeModule(mUIManager)
      .build();
}
 
Example 15
Project: RNLearn_Project1   File: ProgressBarTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(
      new ReactViewManager(),
      new ReactProgressBarViewManager());
  mUIManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

  mInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(mUIManager)
      .addNativeModule(new AndroidInfoModule())
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(ProgressBarTestModule.class)
      .build();

  mRootView = new ReactRootView(getContext());
  DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
  mRootView.setLayoutParams(
      new FrameLayout.LayoutParams(metrics.widthPixels, metrics.heightPixels));
  int rootTag = mUIManager.addMeasuredRootView(mRootView);
  mInstance.getJSModule(ProgressBarTestModule.class).renderProgressBarApplication(rootTag);
  waitForBridgeAndUIIdle();
}
 
Example 16
Project: react-native-pili-player   File: PiliPackage.java   Source Code and License 5 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Arrays.<ViewManager>asList(
            //new PiliLiveViewManager(),
            new PiliPlayerViewManager(),
            new PiliLiveViewManager()
            //new PiliAudioStreamingViewManager()
    );
}
 
Example 17
Project: pili-react-native   File: PiliPackage.java   Source Code and License 5 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Arrays.<ViewManager>asList(
            new PiliStreamingViewManager(),
            new PiliPlayerViewManager(),
            new PiliAudioStreamingViewManager()
    );
}
 
Example 18
Project: react-native-pili-live   File: PiliPackage.java   Source Code and License 5 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Arrays.<ViewManager>asList(
            new PiliStreamingViewManager(),
            new PiliPlayerViewManager(),
            new PiliAudioStreamingViewManager()
    );
}
 
Example 19
Project: react-native-android-material-calendar-view   File: MaterialCalendarViewPackage.java   Source Code and License 5 votes vote down vote up
@Override
public List<ViewManager>
createViewManagers(ReactApplicationContext reactContext) {
     return Collections.<ViewManager>singletonList(
        new MaterialCalendarViewManager()
    );
}
 
Example 20
Project: RNLearn_Project1   File: CompositeReactPackageTest.java   Source Code and License 5 votes vote down vote up
@Test
public void testThatCompositeReturnsASumOfViewManagers() {
  // Given
  CompositeReactPackage composite = new CompositeReactPackage(packageNo1, packageNo2);

  ViewManager managerNo1 = mock(ViewManager.class);
  when(managerNo1.getName()).thenReturn("ManagerNo1");

  // managerNo2 and managerNo3 will share same name, composite should return only the latter one
  final String sameModuleName = "SameModuleName";

  ViewManager managerNo2 = mock(ViewManager.class);
  when(managerNo2.getName()).thenReturn(sameModuleName);

  ViewManager managerNo3 = mock(ViewManager.class);
  when(managerNo3.getName()).thenReturn(sameModuleName);

  ViewManager managerNo4 = mock(ViewManager.class);
  when(managerNo4.getName()).thenReturn("ManagerNo4");

  when(packageNo1.createViewManagers(reactContext)).thenReturn(
      Arrays.asList(new ViewManager[]{managerNo1, managerNo2}));

  when(packageNo2.createViewManagers(reactContext)).thenReturn(
      Arrays.asList(new ViewManager[]{managerNo3, managerNo4}));

  // When
  List<ViewManager> compositeModules = composite.createViewManagers(reactContext);

  // Then

  // Wrapping lists into sets to be order-independent.
  // Note that there should be no managerNo2 returned.
  Set<ViewManager> expected = new HashSet<>(
      Arrays.asList(new ViewManager[]{managerNo1, managerNo3, managerNo4})
  );
  Set<ViewManager> actual = new HashSet<>(compositeModules);

  assertEquals(expected, actual);
}
 
Example 21
Project: RNLearn_Project1   File: FlatUIImplementation.java   Source Code and License 5 votes vote down vote up
@Override
protected ReactShadowNode createShadowNode(String className) {
  ReactShadowNode cssNode = super.createShadowNode(className);
  if (cssNode instanceof FlatShadowNode || cssNode.isVirtual()) {
    return cssNode;
  }

  ViewManager viewManager = resolveViewManager(className);
  return new NativeViewWrapper(viewManager);
}
 
Example 22
Project: RNLearn_Project1   File: FlatUIImplementation.java   Source Code and License 5 votes vote down vote up
private static @Nullable RCTImageViewManager findRCTImageManager(List<ViewManager> viewManagers) {
  for (int i = 0, size = viewManagers.size(); i != size; ++i) {
    if (viewManagers.get(i) instanceof RCTImageViewManager) {
      return (RCTImageViewManager) viewManagers.get(i);
    }
  }

  return null;
}
 
Example 23
Project: RNLearn_Project1   File: ViewRenderingTestCase.java   Source Code and License 5 votes vote down vote up
@Override
protected void setUp() throws Exception {
  super.setUp();

  List<ViewManager> viewManagers = Arrays.<ViewManager>asList(new ReactViewManager());
  final UIManagerModule uiManager = new UIManagerModule(
      getContext(),
      viewManagers,
      new UIImplementationProvider(),
      false);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          uiManager.onHostResume();
        }
      });
  waitForIdleSync();

  mCatalystInstance = ReactTestHelper.catalystInstanceBuilder(this)
      .addNativeModule(uiManager)
      .addNativeModule(new AndroidInfoModule())
      .addNativeModule(new DeviceInfoModule(getContext()))
      .addNativeModule(new AppStateModule(getContext()))
      .addNativeModule(new FakeWebSocketModule())
      .addJSModule(ViewRenderingTestModule.class)
      .build();

  mRootView = new ReactRootView(getContext());
  mRootTag = uiManager.addMeasuredRootView(mRootView);
}
 
Example 24
Project: RNLearn_Project1   File: FlatUIImplementation.java   Source Code and License 5 votes vote down vote up
public static FlatUIImplementation createInstance(
    ReactApplicationContext reactContext,
    List<ViewManager> viewManagers,
    EventDispatcher eventDispatcher,
    boolean memoryImprovementEnabled) {

  RCTImageViewManager rctImageViewManager = findRCTImageManager(viewManagers);
  if (rctImageViewManager != null) {
    Object callerContext = rctImageViewManager.getCallerContext();
    if (callerContext != null) {
      RCTImageView.setCallerContext(callerContext);
    }
  }
  DraweeRequestHelper.setResources(reactContext.getResources());

  TypefaceCache.setAssetManager(reactContext.getAssets());

  ViewManagerRegistry viewManagerRegistry = new ViewManagerRegistry(viewManagers);
  FlatNativeViewHierarchyManager nativeViewHierarchyManager = new FlatNativeViewHierarchyManager(
      viewManagerRegistry);
  FlatUIViewOperationQueue operationsQueue = new FlatUIViewOperationQueue(
      reactContext,
      nativeViewHierarchyManager);
  return new FlatUIImplementation(
    reactContext,
    rctImageViewManager,
    viewManagerRegistry,
    operationsQueue,
    eventDispatcher,
    memoryImprovementEnabled
  );
}
 
Example 25
Project: RNLearn_Project1   File: FlatUIImplementationProvider.java   Source Code and License 5 votes vote down vote up
@Override
public FlatUIImplementation createUIImplementation(
    ReactApplicationContext reactContext,
    List<ViewManager> viewManagers,
    EventDispatcher eventDispatcher) {
  return FlatUIImplementation.createInstance(
    reactContext,
    viewManagers,
    eventDispatcher,
    mMemoryImprovementEnabled);
}
 
Example 26
Project: RNLearn_Project1   File: TextInputTest.java   Source Code and License 5 votes vote down vote up
public UIManagerModule getUIManagerModule() {
  ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest();
  List<ViewManager> viewManagers = Arrays.asList(
      new ViewManager[] {
          new ReactTextInputManager(),
      });
  UIManagerModule uiManagerModule = new UIManagerModule(
      reactContext,
      viewManagers,
      new UIImplementationProvider(),
      false);
  uiManagerModule.onHostResume();
  return uiManagerModule;
}
 
Example 27
Project: RNLearn_Project1   File: ReactTextTest.java   Source Code and License 5 votes vote down vote up
public UIManagerModule getUIManagerModule() {
  ReactApplicationContext reactContext = ReactTestHelper.createCatalystContextForTest();
  List<ViewManager> viewManagers = Arrays.asList(
      new ViewManager[] {
          new ReactTextViewManager(),
          new ReactRawTextManager(),
      });
  UIManagerModule uiManagerModule = new UIManagerModule(
      reactContext,
      viewManagers,
      new UIImplementationProvider(),
      false);
  uiManagerModule.onHostResume();
  return uiManagerModule;
}
 
Example 28
Project: RNLearn_Project1   File: ReactInstanceSpecForTest.java   Source Code and License 4 votes vote down vote up
public List<ViewManager> getExtraViewManagers() {
  return mViewManagers;
}
 
Example 29
Project: RNLearn_Project1   File: ReactInstanceSpecForTest.java   Source Code and License 4 votes vote down vote up
public List<ViewManager> getExtraViewManagers() {
  return mViewManagers;
}
 
Example 30
Project: react-native-caller-id-android   File: CallerIDReactPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 31
Project: react-native-app-metadata   File: RNAppMetadataPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
  return Collections.emptyList();
}
 
Example 32
Project: react-native-immediate-phone-call   File: RNImmediatePhoneCallPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(
        ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 33
Project: RNLearn_Project1   File: ReactPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
  return Collections.emptyList();
}
 
Example 34
Project: react-europe-demo   File: DemoReactPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 35
Project: RNLearn_Project1   File: MainReactPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
  List<ViewManager> viewManagers = new ArrayList<>();

  viewManagers.add(ARTRenderableViewManager.createARTGroupViewManager());
  viewManagers.add(ARTRenderableViewManager.createARTShapeViewManager());
  viewManagers.add(ARTRenderableViewManager.createARTTextViewManager());
  viewManagers.add(new ARTSurfaceViewManager());
  viewManagers.add(new ReactDialogPickerManager());
  viewManagers.add(new ReactDrawerLayoutManager());
  viewManagers.add(new ReactDropdownPickerManager());
  viewManagers.add(new ReactHorizontalScrollViewManager());
  viewManagers.add(new ReactImageManager());
  viewManagers.add(new ReactModalHostManager());
  viewManagers.add(new ReactProgressBarViewManager());
  viewManagers.add(new ReactRawTextManager());
  viewManagers.add(new ReactScrollViewManager());
  viewManagers.add(new ReactSliderManager());
  viewManagers.add(new ReactSwitchManager());
  viewManagers.add(new FrescoBasedReactTextInlineImageViewManager());
  viewManagers.add(new ReactTextInputManager());
  viewManagers.add(new ReactTextViewManager());
  viewManagers.add(new ReactToolbarManager());
  viewManagers.add(new ReactViewManager());
  viewManagers.add(new ReactViewPagerManager());
  viewManagers.add(new ReactVirtualTextViewManager());
  viewManagers.add(new ReactWebViewManager());
  viewManagers.add(new SwipeRefreshLayoutManager());

  SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reactContext);
  if (preferences.getBoolean("flat_uiimplementation", false)) {
    viewManagers.addAll(Arrays.asList(
      new RCTViewManager(),
      new RCTTextManager(),
      new RCTRawTextManager(),
      new RCTVirtualTextManager(),
      new RCTTextInlineImageManager(),
      new RCTImageViewManager(),
      new RCTTextInputManager(),
      new RCTViewPagerManager(),
      new FlatARTSurfaceViewManager(),
      new RCTModalHostManager()));
  }

  return viewManagers;
}
 
Example 36
Project: FingerPrint-Authentication-With-React-Native-Android   File: BioMetricReactPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 37
Project: react-native-download-manager   File: DownloadFilePackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 38
Project: react-native-camera-android-simple   File: CameraPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.<ViewManager>singletonList(
            new CameraViewManager()
    );
}
 
Example 39
Project: react-native-call-detection   File: CallDetectionManager.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(
        ReactApplicationContext reactContext) {
    return Collections.emptyList();
}
 
Example 40
Project: react-native-easybluetooth-le   File: LowEnergyPackage.java   Source Code and License 4 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Collections.emptyList();
}