com.facebook.react.views.progressbar.ReactProgressBarViewManager Java Examples

The following examples show how to use com.facebook.react.views.progressbar.ReactProgressBarViewManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainReactPackage.java    From react-native-gcm-android with MIT License 6 votes vote down vote up
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
    return Arrays.<ViewManager>asList(
            new ReactDrawerLayoutManager(),
            new ReactHorizontalScrollViewManager(),
            new ReactImageManager(),
            new ReactProgressBarViewManager(),
            new ReactRawTextManager(),
            new ReactScrollViewManager(),
            new ReactSwitchManager(),
            new ReactTextInputManager(),
            new ReactTextViewManager(),
            new ReactToolbarManager(),
            new ReactViewManager(),
            new ReactViewPagerManager(),
            new ReactTextInlineImageViewManager(),
            new ReactVirtualTextViewManager(),
            new SwipeRefreshLayoutManager(),
            new ReactWebViewManager());
}
 
Example #2
Source File: ProgressBarTestCase.java    From progress-bar-android with MIT 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, 0);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

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

  mRootView = new ReactRootView(getContext());
  DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
  mRootView.setLayoutParams(
      new FrameLayout.LayoutParams(metrics.widthPixels, metrics.heightPixels));
  int rootTag = mUIManager.addRootView(mRootView);
  mInstance.getJSModule(ProgressBarTestModule.class).renderProgressBarApplication(rootTag);
  waitForBridgeAndUIIdle();
}
 
Example #3
Source File: MainReactPackage.java    From react-native-GPay with MIT License 5 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 ReactCheckBoxManager());
  viewManagers.add(new ReactDialogPickerManager());
  viewManagers.add(new ReactDrawerLayoutManager());
  viewManagers.add(new ReactDropdownPickerManager());
  viewManagers.add(new ReactHorizontalScrollViewManager());
  viewManagers.add(new ReactHorizontalScrollContainerViewManager());
  viewManagers.add(new ReactProgressBarViewManager());
  viewManagers.add(new ReactScrollViewManager());
  viewManagers.add(new ReactSliderManager());
  viewManagers.add(new ReactSwitchManager());
  viewManagers.add(new ReactToolbarManager());
  viewManagers.add(new ReactWebViewManager());
  viewManagers.add(new SwipeRefreshLayoutManager());

  // Native equivalents
  viewManagers.add(new ARTSurfaceViewManager());
  viewManagers.add(new FrescoBasedReactTextInlineImageViewManager());
  viewManagers.add(new ReactImageManager());
  viewManagers.add(new ReactModalHostManager());
  viewManagers.add(new ReactRawTextManager());
  viewManagers.add(new ReactTextInputManager());
  viewManagers.add(new ReactTextViewManager());
  viewManagers.add(new ReactViewManager());
  viewManagers.add(new ReactViewPagerManager());
  viewManagers.add(new ReactVirtualTextViewManager());

  return viewManagers;
}
 
Example #4
Source File: ProgressBarTestCase.java    From react-native-GPay with MIT 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, 0);
  UiThreadUtil.runOnUiThread(
      new Runnable() {
        @Override
        public void run() {
          mUIManager.onHostResume();
        }
      });
  waitForIdleSync();

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

  mRootView = new ReactRootView(getContext());
  DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
  mRootView.setLayoutParams(
      new FrameLayout.LayoutParams(metrics.widthPixels, metrics.heightPixels));
  int rootTag = mUIManager.addRootView(mRootView);
  mInstance.getJSModule(ProgressBarTestModule.class).renderProgressBarApplication(rootTag);
  waitForBridgeAndUIIdle();
}