public class AccessibilityInfoModule extends NativeAccessibilityInfoSpec implements LifecycleEventListener
NativeModule.NativeMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC
Constructor and Description |
---|
AccessibilityInfoModule(ReactApplicationContext context) |
Modifier and Type | Method and Description |
---|---|
void |
announceForAccessibility(java.lang.String message) |
java.lang.String |
getName() |
void |
initialize()
This is called at the end of
CatalystApplicationFragment#createCatalystInstance() after
the CatalystInstance has been created, in order to initialize NativeModules that require the
CatalystInstance or JS modules. |
void |
isReduceMotionEnabled(Callback successCallback) |
void |
isTouchExplorationEnabled(Callback successCallback) |
void |
onCatalystInstanceDestroy()
Called before {CatalystInstance#onHostDestroy}
|
void |
onHostDestroy()
Called when host activity receives destroy event (e.g.
|
void |
onHostPause()
Called when host activity receives pause event (e.g.
|
void |
onHostResume()
Called either when the host activity receives a resume event (e.g.
|
void |
setAccessibilityFocus(double reactTag) |
getCurrentActivity, getReactApplicationContext, getReactApplicationContextIfActiveOrWarn
canOverrideExistingModule, getConstants, hasConstants, invalidate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invalidate
public static final java.lang.String NAME
public AccessibilityInfoModule(ReactApplicationContext context)
public java.lang.String getName()
getName
in interface NativeModule
require()
this module
from javascript.public void isReduceMotionEnabled(Callback successCallback)
isReduceMotionEnabled
in class NativeAccessibilityInfoSpec
public void isTouchExplorationEnabled(Callback successCallback)
isTouchExplorationEnabled
in class NativeAccessibilityInfoSpec
public void onHostResume()
LifecycleEventListener
Activity#onResume
or
if the native module that implements this is initialized while the host activity is already
resumed. Always called for the most current activity.onHostResume
in interface LifecycleEventListener
public void onHostPause()
LifecycleEventListener
Activity#onPause
. Always called
for the most current activity.onHostPause
in interface LifecycleEventListener
public void initialize()
NativeModule
CatalystApplicationFragment#createCatalystInstance()
after
the CatalystInstance has been created, in order to initialize NativeModules that require the
CatalystInstance or JS modules.initialize
in interface NativeModule
initialize
in class BaseJavaModule
public void onCatalystInstanceDestroy()
NativeModule
onCatalystInstanceDestroy
in interface NativeModule
onCatalystInstanceDestroy
in class BaseJavaModule
public void onHostDestroy()
LifecycleEventListener
Activity#onDestroy
. Only called
for the last React activity to be destroyed.onHostDestroy
in interface LifecycleEventListener
public void announceForAccessibility(java.lang.String message)
announceForAccessibility
in class NativeAccessibilityInfoSpec
public void setAccessibilityFocus(double reactTag)
setAccessibilityFocus
in class NativeAccessibilityInfoSpec