Android TutorialsNo Comments

453 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

Be the first to post a comment.

Add a comment