How to create a custom toast message from button click in android studio.

Toast messages are a quick way of telling the user something. They are short pop-up messages that show for a second or two and then fade away. Here's a basic Toast. It pops up near the bottom of the screen.

A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. Toasts automatically disappear after a timeout.

Code For toast is very simple- 
public void onClick(View arg0)
{
Toast.makeText(getApplicationContext(),"Button is clicked", Toast.LENGTH_LONG).show();
}
 

Comments

Popular posts from this blog

How to set or How to fixed Android Screen Orientation Android Studio Tutorial

How to set webview among Android Activity in Android Studio

Google Standard Color For Android Studio