public class ToastModule extends NativeToastAndroidSpec
NativeModule that allows JS to show an Android Toast.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 |
|---|
ToastModule(ReactApplicationContext reactContext) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName() |
java.util.Map<java.lang.String,java.lang.Object> |
getTypedExportedConstants() |
void |
show(java.lang.String message,
double durationDouble) |
void |
showWithGravity(java.lang.String message,
double durationDouble,
double gravityDouble) |
void |
showWithGravityAndOffset(java.lang.String message,
double durationDouble,
double gravityDouble,
double xOffsetDouble,
double yOffsetDouble) |
getConstantsgetCurrentActivity, getReactApplicationContext, getReactApplicationContextIfActiveOrWarncanOverrideExistingModule, hasConstants, initialize, invalidate, onCatalystInstanceDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvalidatepublic static final java.lang.String NAME
public ToastModule(ReactApplicationContext reactContext)
public java.lang.String getName()
require() this module
from javascript.public java.util.Map<java.lang.String,java.lang.Object> getTypedExportedConstants()
getTypedExportedConstants in class NativeToastAndroidSpecpublic void show(java.lang.String message,
double durationDouble)
show in class NativeToastAndroidSpecpublic void showWithGravity(java.lang.String message,
double durationDouble,
double gravityDouble)
showWithGravity in class NativeToastAndroidSpecpublic void showWithGravityAndOffset(java.lang.String message,
double durationDouble,
double gravityDouble,
double xOffsetDouble,
double yOffsetDouble)
showWithGravityAndOffset in class NativeToastAndroidSpec