AL
AlfredoHdez1709/ModToast
Quickly and easily create a custom toast on Android
ModToast
Quickly and easily create a custom toast on Android
ScreenShoot
Style Round
Style Border with icon
Style Flat
Style basic
NOTE
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
Integration
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.AlfredoHdez1709:ModToast:1.0.0'
}
Implementation
Basic implementation
ModToast("This is ModToast", 0)
Full implementation
ModToast("This is ModToast",
0,
ModToast.FLAT,
android.R.color.black,
android.R.color.white ,
R.drawable.ic_android_black_24dp)
Attributes
| 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 |
On this page
Languages
Kotlin100.0%
Contributors
Created May 6, 2021
Updated May 7, 2021



