Skip to content

A Library (a function, really) to show multiple snackbars sequentially.

License

Notifications You must be signed in to change notification settings

mhashim6/SnackbarQueue

Repository files navigation

SnackbarQueue

A Library (a function, really) to show multiple snackbars sequentially.

Usage:

Snackbar.make(root, R.string.welcome_message, LENGTH_LONG).enqueue() //first one will immediately show.  
Snackbar.make(root, R.string.introduction_message, LENGTH_LONG).enqueue() //but here, magic happens. 
Snackbar.make(root, R.string.preferences_tutorial, LENGTH_LONG).enqueue()  
Snackbar.make(root, R.string.goodbye_tutorial, LENGTH_LONG).enqueue() //last one to show, after all the others have been sequentially (and gracefully) dismissed. 

Apps using this library:

Dependency:

Add it in your root build.gradle at the end of repositories:

allprojects {  
    repositories { 
       ... 
       maven { url 'https://jitpack.io' } 
    }
 }  

Add the dependency:

dependencies {  
 implementation 'com.github.mhashim6:SnackbarQueue:1.3'
 }