This is Android Navigation Drawer 2017 and you’ll learn how to use Snackbar in Fragment in Android (without CoordinatorLayout). Snackbar is part of the Material Design from Android. It needs library and you should include it in the Gradle. Usually Snackbar needs CoordinatorLayout along with FloatingActionButton. But you can actually use the Snackbar without CoordinatorLayout for example in Fragment you don’t have the layout. What you have to do is to called a View from android.R.id.content and you attach the View instance into the first parameter of the Snackbar.

Comments

comments