This is RxJava / RxKotlin adapter for Android Snackbar
Observable.just(true)
.withNextSnackBar(view, "Data is coming!") // will show "Number is comming!"
.subscribe()
// will show "Some data" and Undo action
Observable.just("Some data")
.withNextSnackBar(view, actionName = "Undo") { view -> someUndoAction() }
.subscribe()
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.unhappychoice:rxsnackbar:$version'
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.unhappychoice</groupId>
<artifactId>rxsnackbar</artifactId>
<version>$version</version>
</dependency>
see LICENSE