Java Code Examples for com.facebook.react.bridge.OnBatchCompleteListener

The following are top voted examples for showing how to use com.facebook.react.bridge.OnBatchCompleteListener. 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: NativeModuleRegistryBuilder.java   View source code 5 votes vote down vote up
public NativeModuleRegistry build() {
  ArrayList<ModuleHolder> batchCompleteListenerModules = new ArrayList<>();
  for (Map.Entry<Class<? extends NativeModule>, ModuleHolder> entry : mModules.entrySet()) {
    if (OnBatchCompleteListener.class.isAssignableFrom(entry.getKey())) {
      batchCompleteListenerModules.add(entry.getValue());
    }
  }

  return new NativeModuleRegistry(
    mReactApplicationContext,
    mModules,
    batchCompleteListenerModules);
}
 
Example 2
Project: RNLearn_Project1   File: NativeModuleRegistry.java   View source code 5 votes vote down vote up
public void onBatchComplete() {
  for (ModuleHolder moduleHolder : mBatchCompleteListenerModules) {
    if (moduleHolder.isInitialized()) {
      ((OnBatchCompleteListener) moduleHolder.getModule()).onBatchComplete();
    }
  }
}
 
Example 3
Project: RNLearn_Project1   File: NativeModuleRegistryBuilder.java   View source code 5 votes vote down vote up
public NativeModuleRegistry build() {
  ArrayList<ModuleHolder> batchCompleteListenerModules = new ArrayList<>();
  for (Map.Entry<Class<? extends NativeModule>, ModuleHolder> entry : mModules.entrySet()) {
    if (OnBatchCompleteListener.class.isAssignableFrom(entry.getKey())) {
      batchCompleteListenerModules.add(entry.getValue());
    }
  }

  return new NativeModuleRegistry(
    mReactApplicationContext,
    mModules,
    batchCompleteListenerModules);
}
 
Example 4
Project: RNLearn_Project1   File: NativeModuleRegistry.java   View source code 5 votes vote down vote up
public void onBatchComplete() {
  for (ModuleHolder moduleHolder : mBatchCompleteListenerModules) {
    if (moduleHolder.isInitialized()) {
      ((OnBatchCompleteListener) moduleHolder.getModule()).onBatchComplete();
    }
  }
}