When you want to give the background color to the view, but you want to add more colors and get the gradient effect, you need to add layer to view,
which we are going to create, in few lines of code.
Android Snackbar is an interesting component introduced with the Material Design. Snackbars are very similar to the Toast messages with a few exceptions but the biggest is that provide action to interact with. Snackbar will be displayed at the bottom of the screen and can be swiped away in order to dismiss them. Major Difference