How to used SanckBar in Android ?

They automatically fade
out after enough time similar to a toast. The 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 device. You are make
custom Material Design SanckBar, and set Background color programmatically.

You can also mention a
callback intraction method using setAction() method.