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) |
getConstants
getCurrentActivity, getReactApplicationContext, getReactApplicationContextIfActiveOrWarn
canOverrideExistingModule, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invalidate
public 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 NativeToastAndroidSpec
public void show(java.lang.String message, double durationDouble)
show
in class NativeToastAndroidSpec
public void showWithGravity(java.lang.String message, double durationDouble, double gravityDouble)
showWithGravity
in class NativeToastAndroidSpec
public void showWithGravityAndOffset(java.lang.String message, double durationDouble, double gravityDouble, double xOffsetDouble, double yOffsetDouble)
showWithGravityAndOffset
in class NativeToastAndroidSpec