Toast in Android Example
Toast in android is used to display a message on screen for a small period of time. Toast fades automatically after small time. Toast.LENGTH_SHORT and Toast.LENGTH_LONG are two constants to specify duration of Toast.
context – This is our application context.
message – Type a message here to display on screen.
duration – Time of toast to simply on screen.
show() – This method is used to display the toast.