Toast in Android
Android Toast is used to show sort message. Toast message takes only that amount of space that is required to show message, and during that time activity is visible and user can interact with it. Toasts automatically disappear after a timeout. Toast Usage : We can use Toast to show sort message as follows: Toast . makeText ( getApplicationContext(), "Your Message" , Toast . LENGTH_LONG ).show(); We need to pass 3 arguments in Toast.makeText(Context context,String message,int length) function as follows: Context: First argument is Context object String: Message which you want to display in Toast. int: third parameter is duration. It can have values Toast. LENGTH_SHORT or Toast. LENGTH_LONG Set Position of Toast : We can change the position...