toastandroid react native 1

toastandroid react native

import {ToastAndroid} from 'react-native' ;


	"All Your Base Are Belong To Us",


Here is what the above code is Doing:
1. Importing the ToastAndroid module from the react-native library.
2. Calling the showWithGravity() method of the ToastAndroid module and passing the following parameters:
a. A string with the text to toast
b. The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG
c. Gravity. To set the position of the toast. May be ToastAndroid.TOP, ToastAndroid.BOTTOM or ToastAndroid.CENTER.

Similar Posts