A simple and more powerful Toast.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.Doublemine:AgileToast:1.0.2'
}
The base usage:
AgileToast.Companion.build(MainActivity.this)
.text("Some message.")
.show();
Advance usage:
AgileToast.Companion.build(MainActivity.this)
.type(ToastType.NORMAL)
.text("AgileToast send msg...")
.animation(AnimationType.DRAWER_BOTTOM)
.duration(Duration.CUSTOM, 1000L)
.style(ToastStyle.FILL)
.gravity(Gravity.CENTER | Gravity.BOTTOM)
.offsetY(200)
.dismissCallback(MainActivity.this)
.bgColor(ResourcesCompat.getColor(getResources(), R.color.colorAccent, null))
.show();
see the source code of demo to learn more advance usage.