The android.widget.Toast class provides a simple way to show small information messages that pop up at the bottom of the screen. The setGravity method can be used to set the position of the toast on the screen.
Example 1: Set toast to appear at the center of the screen.
These examples use the Gravity class from the android.view package library to specify the position of the toast on the screen. The Toast class itself is part of the android.widget package library.
Java Toast.setGravity - 30 examples found. These are the top rated real world Java examples of android.widget.Toast.setGravity extracted from open source projects. You can rate examples to help us improve the quality of examples.