Custom ToastMessag For Ease use Toast with good view
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- make sure the version matches the JitPack badge above
dependencies {
implementation 'com.github.MohamedNajib:ToastMessag:1.1.0'
}
If you still using Android support library
in your android apps Add the dependency in your build.gradle
file
dependencies {
implementation 'com.github.MohamedNajib:Support_ToastMessag:1.1.0'
}
ToastMessage.setSuccess(yourContext,"Success Toast", ToastMessage.LENGTH_LONG, true).show();
ToastMessage.setInfo(yourContext, "Info Toast", ToastMessage.LENGTH_SHORT, true).show();
ToastMessage.setWarning(yourContext, "Warning Toast", ToastMessage.LENGTH_SHORT, true).show();
ToastMessage.setError(yourContext, "Error Toast", ToastMessage.LENGTH_SHORT, true).show();
ToastMessage.setNormal(yourContext, "Normal Toast", ToastMessage.LENGTH_LONG).show();