Challenge: Customizing the Toast

In this challenge, you will customize the toast to show at the top instead of the bottom of the screen. To change how the toast is displayed, use the Toast class’s setGravity method. Use Gravity.TOP for the gravity value. Refer to the developer documentation at developer.android.com/​reference/​android/​widget/​Toast.xhtml#setGravity(int, int, int) for more details.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.235.196