Skip to content

Commit

Permalink
Add very basic usage example for android toast
Browse files Browse the repository at this point in the history
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 #9859

Differential Revision: D3886274

Pulled By: donyu

fbshipit-source-id: 15e693f5ddb1efea0fc6b7accfa688fd5f99a100
  • Loading branch information
mdamien authored and Facebook Github Bot 1 committed Sep 19, 2016
1 parent 8b8c2ec commit 644b93d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Libraries/Components/ToastAndroid/ToastAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 644b93d

Please sign in to comment.