-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule,com.facebook.react.bridge.ReactModuleWithSpec,com.facebook.react.turbomodule.core.interfaces.TurboModule
public class AppearanceModule extends NativeAppearanceSpec
Module that exposes the user's preferred color scheme.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAppearanceModule.OverrideColorSchemeOptional override to the current color scheme
-
Constructor Summary
Constructors Constructor Description AppearanceModule(ReactApplicationContext reactContext)AppearanceModule(ReactApplicationContext reactContext, AppearanceModule.OverrideColorScheme overrideColorScheme)
-
Method Summary
Modifier and Type Method Description StringgetName()StringgetColorScheme()voidaddListener(String eventName)Stub voidremoveListeners(double count)Stub voidonConfigurationChanged(Context currentContext)voidemitAppearanceChanged(String colorScheme)Sends an event to the JS instance that the preferred color scheme has changed. -
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AppearanceModule
AppearanceModule(ReactApplicationContext reactContext)
-
AppearanceModule
AppearanceModule(ReactApplicationContext reactContext, AppearanceModule.OverrideColorScheme overrideColorScheme)
-
-
Method Detail
-
getColorScheme
String getColorScheme()
-
addListener
void addListener(String eventName)
Stub
-
removeListeners
void removeListeners(double count)
Stub
-
onConfigurationChanged
void onConfigurationChanged(Context currentContext)
-
emitAppearanceChanged
void emitAppearanceChanged(String colorScheme)
Sends an event to the JS instance that the preferred color scheme has changed.
-
-
-
-