当前位置: 首页>>代码示例>>Java>>正文


Java DefaultHardwareBackBtnHandler类代码示例

本文整理汇总了Java中com.facebook.react.modules.core.DefaultHardwareBackBtnHandler的典型用法代码示例。如果您正苦于以下问题:Java DefaultHardwareBackBtnHandler类的具体用法?Java DefaultHardwareBackBtnHandler怎么用?Java DefaultHardwareBackBtnHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultHardwareBackBtnHandler类属于com.facebook.react.modules.core包,在下文中一共展示了DefaultHardwareBackBtnHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
@Override
public void onResume() {
    super.onResume();
    if (getReactNativeHost().hasInstance()) {
        getReactNativeHost().getReactInstanceManager().onHostResume(getActivity(), (DefaultHardwareBackBtnHandler) getActivity());
    }
}
 
开发者ID:hudl,项目名称:react-native-android-fragment,代码行数:8,代码来源:ReactFragment.java

示例2: onHostResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
/**
 * Use this method when the activity resumes to enable invoking the back button directly from JS.
 *
 * This method retains an instance to provided mDefaultBackButtonImpl. Thus it's important to pass
 * from the activity instance that owns this particular instance of {@link
 * ReactInstanceManager}, so that once this instance receive {@link #onHostDestroy} event it
 * will clear the reference to that defaultBackButtonImpl.
 *
 * @param defaultBackButtonImpl a {@link DefaultHardwareBackBtnHandler} from an Activity that owns
 * this instance of {@link ReactInstanceManager}.
 */
public void onHostResume(Activity activity, DefaultHardwareBackBtnHandler defaultBackButtonImpl) {
  UiThreadUtil.assertOnUiThread();

  mDefaultBackButtonImpl = defaultBackButtonImpl;
  if (mUseDeveloperSupport) {
    mDevSupportManager.setDevSupportEnabled(true);
  }

  mCurrentActivity = activity;
  moveToResumedLifecycleState(false);
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:23,代码来源:ReactInstanceManager.java

示例3: onResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
protected void onResume() {
  if (getReactNativeHost().hasInstance()) {
    getReactNativeHost().getReactInstanceManager().onHostResume(
      getPlainActivity(),
      (DefaultHardwareBackBtnHandler) getPlainActivity());
  }

  if (mPermissionsCallback != null) {
    mPermissionsCallback.invoke();
    mPermissionsCallback = null;
  }
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:13,代码来源:ReactActivityDelegate.java

示例4: CoreModulesPackage

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
CoreModulesPackage(
  ReactInstanceManager reactInstanceManager,
  DefaultHardwareBackBtnHandler hardwareBackBtnHandler,
  UIImplementationProvider uiImplementationProvider,
  boolean lazyViewManagersEnabled) {
  mReactInstanceManager = reactInstanceManager;
  mHardwareBackBtnHandler = hardwareBackBtnHandler;
  mUIImplementationProvider = uiImplementationProvider;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:11,代码来源:CoreModulesPackage.java

示例5: onHostResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
/**
 * Use this method when the activity resumes to enable invoking the back button directly from JS.
 *
 * This method retains an instance to provided mDefaultBackButtonImpl. Thus it's
 * important to pass from the activity instance that owns this particular instance of {@link
 * ReactInstanceManagerImpl}, so that once this instance receive {@link #onHostDestroy} event it will
 * clear the reference to that defaultBackButtonImpl.
 *
 * @param defaultBackButtonImpl a {@link DefaultHardwareBackBtnHandler} from an Activity that owns
 * this instance of {@link ReactInstanceManagerImpl}.
 */
@Override
public void onHostResume(Activity activity, DefaultHardwareBackBtnHandler defaultBackButtonImpl) {
  UiThreadUtil.assertOnUiThread();


  mDefaultBackButtonImpl = defaultBackButtonImpl;
  if (mUseDeveloperSupport) {
    mDevSupportManager.setDevSupportEnabled(true);
  }

  mCurrentActivity = activity;
  moveToResumedLifecycleState(false);
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:25,代码来源:ReactInstanceManagerImpl.java

示例6: CoreModulesPackage

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
CoreModulesPackage(
    ReactInstanceManager reactInstanceManager,
    DefaultHardwareBackBtnHandler hardwareBackBtnHandler,
    UIImplementationProvider uiImplementationProvider) {
  mReactInstanceManager = reactInstanceManager;
  mHardwareBackBtnHandler = hardwareBackBtnHandler;
  mUIImplementationProvider = uiImplementationProvider;
}
 
开发者ID:john1jan,项目名称:ReactNativeSignatureExample,代码行数:9,代码来源:CoreModulesPackage.java

示例7: ReactInstanceManagerImpl

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
ReactInstanceManagerImpl(
    Context applicationContext,
    @Nullable Activity currentActivity,
    @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
    @Nullable String jsBundleFile,
    @Nullable String jsMainModuleName,
    List<ReactPackage> packages,
    boolean useDeveloperSupport,
    @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
    LifecycleState initialLifecycleState,
    UIImplementationProvider uiImplementationProvider,
    NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
    @Nullable JSCConfig jscConfig) {
  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  setDisplayMetrics(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mJSBundleFile = jsBundleFile;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
}
 
开发者ID:ManrajGrover,项目名称:react-native-box-loaders,代码行数:39,代码来源:ReactInstanceManagerImpl.java

示例8: onResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
protected void onResume() {
  if (getReactNativeHost().hasInstance()) {
    getReactNativeHost().getReactInstanceManager().onHostResume(
      getPlainActivity(),
      (DefaultHardwareBackBtnHandler) getPlainActivity());
  }
}
 
开发者ID:Right-Men,项目名称:Ironman,代码行数:8,代码来源:ReactActivityDelegate.java

示例9: onHostResume

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
/**
 * Use this method when the activity resumes to enable invoking the back button directly from JS.
 *
 * This method retains an instance to provided mDefaultBackButtonImpl. Thus it's important to pass
 * from the activity instance that owns this particular instance of {@link
 * XReactInstanceManagerImpl}, so that once this instance receive {@link #onHostDestroy} event it
 * will clear the reference to that defaultBackButtonImpl.
 *
 * @param defaultBackButtonImpl a {@link DefaultHardwareBackBtnHandler} from an Activity that owns
 * this instance of {@link XReactInstanceManagerImpl}.
 */
@Override
public void onHostResume(Activity activity, DefaultHardwareBackBtnHandler defaultBackButtonImpl) {
  UiThreadUtil.assertOnUiThread();

  mDefaultBackButtonImpl = defaultBackButtonImpl;
  if (mUseDeveloperSupport) {
    mDevSupportManager.setDevSupportEnabled(true);
  }

  mCurrentActivity = activity;
  moveToResumedLifecycleState(false);
}
 
开发者ID:Right-Men,项目名称:Ironman,代码行数:24,代码来源:XReactInstanceManagerImpl.java

示例10: CoreModulesPackage

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
CoreModulesPackage(
  ReactInstanceManager reactInstanceManager,
  DefaultHardwareBackBtnHandler hardwareBackBtnHandler,
  UIImplementationProvider uiImplementationProvider) {
  mReactInstanceManager = reactInstanceManager;
  mHardwareBackBtnHandler = hardwareBackBtnHandler;
  mUIImplementationProvider = uiImplementationProvider;
}
 
开发者ID:Right-Men,项目名称:Ironman,代码行数:9,代码来源:CoreModulesPackage.java

示例11: ReactInstanceManager

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
ReactInstanceManager(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled,
  boolean useStartupThread) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
  mUseStartupThread = useStartupThread;
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:48,代码来源:ReactInstanceManager.java

示例12: setDefaultHardwareBackBtnHandler

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
public ReactInstanceManagerBuilder setDefaultHardwareBackBtnHandler(
  DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler) {
  mDefaultHardwareBackBtnHandler = defaultHardwareBackBtnHandler;
  return this;
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:6,代码来源:ReactInstanceManagerBuilder.java

示例13: setDefaultHardwareBackBtnHandler

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
public Builder setDefaultHardwareBackBtnHandler(
    DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler) {
  mDefaultHardwareBackBtnHandler = defaultHardwareBackBtnHandler;
  return this;
}
 
开发者ID:ManrajGrover,项目名称:react-native-box-loaders,代码行数:6,代码来源:ReactInstanceManager.java

示例14: XReactInstanceManagerImpl

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
XReactInstanceManagerImpl(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
}
 
开发者ID:Right-Men,项目名称:Ironman,代码行数:46,代码来源:XReactInstanceManagerImpl.java

示例15: onResumeActivity

import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; //导入依赖的package包/类
public void onResumeActivity(Activity activity, DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler) {
	getReactInstanceManager().onHostResume(activity, defaultHardwareBackBtnHandler);
	jsDevReloadHandler.onResumeActivity();
}
 
开发者ID:wix,项目名称:react-native-navigation,代码行数:5,代码来源:NavigationReactGateway.java


注:本文中的com.facebook.react.modules.core.DefaultHardwareBackBtnHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。