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 write bangla language in Android Studio

How to create Switch with SSwitch Control with setOnCheckedChangeListener