Swipe Downer Message Android Library
build.gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
implementation 'com.github.prongbang:swipedowner:1.0.4'
implementation 'com.github.prongbang:swipedowner:2.0.0'
In Activity
// error
SwipeDowner(this).builder().isError().message("Error").show()
// warning
SwipeDowner(this).builder().isWarning().message("Warning").show()
// success
SwipeDowner(this).builder().isSuccess().message("Success").show()
In Fragment
// error
SwipeDowner(activity).builder().isError().message("Error").show()
// warning
SwipeDowner(activity).builder().isWarning().message("Warning").show()
// success
SwipeDowner(activity).builder().isSuccess().message("Success").show()
Example in Activity
fab1.setOnClickListener { view ->
SwipeDowner(this).builder()
.isError()
.message("Error")
.show()
}
fab2.setOnClickListener { view ->
SwipeDowner(this).builder()
.isWarning()
.message("Warning")
.show()
}
fab3.setOnClickListener { view ->
SwipeDowner(this).builder()
.isSuccess()
.message("Success")
.show()
}