General Mistake in Simple Toast


Android toast example :

Android Toast is a small message shown when a particular action is done, as apart of result i.e., output of the work done.

Format for a toast in android


Short Toast

Toast.makeText(MainActivity.this, "", Toast.LENGTH_SHORT).show();


Long Toast

Toast.makeText(MainActivity.this, "", Toast.LENGTH_LONG).show();


So the error is that .show() will be missed sometime, then the actual problem is code will not show any error but will not display any toast.

Any queries in android toast do let us know in comment section below.

For more interesting tutorials like and share this tutorial.


Show Buttons
Hide Buttons
Read previous post:
Android Tutorial on Rating Bar

  Android Ratingbar : Android ratingbar is used to display the quality of a product in many fields to give...