Snackbar in Android _Material design

507 views.

Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time.

They automatically disappear after a timeout or after user interaction elsewhere on the screen, particularly after interactions that summon a new surface or activity. Snackbars can be swiped off screen.

Include the following dependency in your build.gradle file

build.gradle:

activity_main.java

MainActivity.Java

OutPut:

snack

You may also like...

Leave a Reply