Toast and SnackBar in Android
Toast and SnackBar is comonly used to display any Error Mesage or Temporary Datas.This will be not shown after Some time Depending upon the Time given to the toast bar.
A simple Toast Bar Can be Displayed as Below.
Toast.makeText(getApplicationContext,"Message to be displayed",Toast.LENGTH_LONG).show();
It will be displayed at any position.By default it will be displayed at Bottom.
A simple Toast Bar Can be Displayed as Below.
Toast.makeText(getApplicationContext,"Message to be displayed",Toast.LENGTH_LONG).show();
It will be displayed at any position.By default it will be displayed at Bottom.
SnackBar
SnackBar is displayed at the Bottom of the Display
Comments
Post a Comment