mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 11:05:21 +00:00
Add very basic usage example for android toast
Summary: Currently, it's hard to find out that it's very easy to use android toasts. The example is very complex and hard to grasp for a beginner. So, I propose to add an easy to understand example. I'm sure the syntax of this PR is not really correct, it's just a start to show the kind of thing I propose. Closes https://github.com/facebook/react-native/pull/9859 Differential Revision: D3886274 Pulled By: donyu fbshipit-source-id: 15e693f5ddb1efea0fc6b7accfa688fd5f99a100
This commit is contained in:
parent
8b8c2ece7b
commit
644b93dc11
@ -21,7 +21,13 @@ var RCTToastAndroid = require('NativeModules').ToastAndroid;
|
||||
* 2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG
|
||||
*
|
||||
* There is also a function `showWithGravity` to specify the layout gravity. May be
|
||||
* ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER
|
||||
* ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER.
|
||||
*
|
||||
* Basic usage:
|
||||
* ```javascript
|
||||
* ToastAndroid.show('A pikachu appeared nearby !', ToastAndroid.SHORT);
|
||||
* ToastAndroid.showWithGravity('All Your Base Are Belong To Us', ToastAndroid.SHORT, ToastAndroid.CENTER);
|
||||
* ```
|
||||
*/
|
||||
|
||||
var ToastAndroid = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user