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.







SnackBar


SnackBar is displayed at the Bottom of the Display

Comments

Popular posts from this blog

Splash Screen-Android

Basic Terms For Writing XML code Instead of Drag and Drop

How to Add Banner Ad to your Project-Android.