Java 类com.facebook.react.modules.fresco.FrescoModule 实例源码

项目:RNLearn_Project1    文件:FlatUIImplementation.java   
@Override
protected ReactShadowNode createRootShadowNode() {
  if (mRCTImageViewManager != null) {
    // This is not the best place to initialize DraweeRequestHelper, but order of module
    // initialization is undefined, and this is pretty much the earliest when we are guarantied
    // that Fresco is initalized and DraweeControllerBuilder can be queried. This also happens
    // relatively rarely to have any performance considerations.
    mReactContext.getNativeModule(FrescoModule.class); // initialize Fresco
    DraweeRequestHelper.setDraweeControllerBuilder(
      mRCTImageViewManager.getDraweeControllerBuilder());
    mRCTImageViewManager = null;
  }

  ReactShadowNode node = new FlatRootShadowNode();
  I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
  if (sharedI18nUtilInstance.isRTL(mReactContext)) {
    node.setLayoutDirection(YogaDirection.RTL);
  }
  return node;
}
项目:RNLearn_Project1    文件:FlatUIImplementation.java   
@Override
protected ReactShadowNode createRootShadowNode() {
  if (mRCTImageViewManager != null) {
    // This is not the best place to initialize DraweeRequestHelper, but order of module
    // initialization is undefined, and this is pretty much the earliest when we are guarantied
    // that Fresco is initalized and DraweeControllerBuilder can be queried. This also happens
    // relatively rarely to have any performance considerations.
    mReactContext.getNativeModule(FrescoModule.class); // initialize Fresco
    DraweeRequestHelper.setDraweeControllerBuilder(
      mRCTImageViewManager.getDraweeControllerBuilder());
    mRCTImageViewManager = null;
  }

  ReactShadowNode node = new FlatRootShadowNode();
  I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
  if (sharedI18nUtilInstance.isRTL(mReactContext)) {
    node.setLayoutDirection(YogaDirection.RTL);
  }
  return node;
}
项目:ReactNativeSignatureExample    文件:MainReactPackage.java   
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
  return Arrays.<NativeModule>asList(
    new AppStateModule(reactContext),
    new AsyncStorageModule(reactContext),
    new CameraRollManager(reactContext),
    new ClipboardModule(reactContext),
    new DatePickerDialogModule(reactContext),
    new DialogModule(reactContext),
    new FrescoModule(reactContext),
    new ImageEditingManager(reactContext),
    new ImageStoreManager(reactContext),
    new IntentModule(reactContext),
    new LocationModule(reactContext),
    new NetworkingModule(reactContext),
    new NetInfoModule(reactContext),
    new StatusBarModule(reactContext),
    new TimePickerDialogModule(reactContext),
    new ToastModule(reactContext),
    new VibrationModule(reactContext),
    new WebSocketModule(reactContext)
  );
}
项目:react-native-ibeacon-android    文件:MainReactPackage.java   
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
  return Arrays.<NativeModule>asList(
    new AppStateModule(reactContext),
    new AsyncStorageModule(reactContext),
    new CameraRollManager(reactContext),
    new ClipboardModule(reactContext),
    new DatePickerDialogModule(reactContext),
    new DialogModule(reactContext),
    new FrescoModule(reactContext),
    new ImageEditingManager(reactContext),
    new ImageStoreManager(reactContext),
    new IntentModule(reactContext),
    new LocationModule(reactContext),
    new NetworkingModule(reactContext),
    new NetInfoModule(reactContext),
    new StatusBarModule(reactContext),
    new TimePickerDialogModule(reactContext),
    new ToastModule(reactContext),
    new VibrationModule(reactContext),
    new WebSocketModule(reactContext)
  );
}
项目:react-native-box-loaders    文件:MainReactPackage.java   
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
  return Arrays.<NativeModule>asList(
    new AppStateModule(reactContext),
    new AsyncStorageModule(reactContext),
    new CameraRollManager(reactContext),
    new ClipboardModule(reactContext),
    new DatePickerDialogModule(reactContext),
    new DialogModule(reactContext),
    new FrescoModule(reactContext),
    new ImageEditingManager(reactContext),
    new ImageLoaderModule(reactContext),
    new ImageStoreManager(reactContext),
    new IntentModule(reactContext),
    new LocationModule(reactContext),
    new NetworkingModule(reactContext),
    new NetInfoModule(reactContext),
    new StatusBarModule(reactContext),
    new TimePickerDialogModule(reactContext),
    new ToastModule(reactContext),
    new VibrationModule(reactContext),
    new WebSocketModule(reactContext)
  );
}
项目:react-native-gcm-android    文件:MainReactPackage.java   
@Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
        return Arrays.<NativeModule>asList(
                new AsyncStorageModule(reactContext),
//                new ClipboardModule(reactContext),
                new FrescoModule(reactContext),
                new IntentModule(reactContext),
                new LocationModule(reactContext),
                new NetworkingModule(reactContext),
//                new NetInfoModule(reactContext),
                new WebSocketModule(reactContext));
//                new ToastModule(reactContext));
    }