Quickly and easily create a custom toast on Android
Style Round
Style Border with icon
Style Flat
Style basic
As it is used in the SDK 30 version, the basic version is implemented, due to disuse of some functions. I am working to have a custom toast in this version
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.AlfredoHdez1709:ModToast:1.0.0'
}
ModToast("This is ModToast", 0)
ModToast("This is ModToast",
0,
ModToast.FLAT,
android.R.color.black,
android.R.color.white ,
R.drawable.ic_android_black_24dp)
Attributes | Type | isRequired | Note |
---|---|---|---|
text | String | True | |
duration | int | True | 0 = SHORT 1 = LONG |
style | ModToast | False | ROUND FLAT BORDER |
backgroundTint | int/null | False | Index for resource |
textColor | int/null | False | Index for resource |
imageRes | int/null | False | Index for resource |