It's a Toast can be customed by yourself.And it have some buid-in Toasts for many situations.
####Use source code: Copy the source code in "MyToast/mytoast/src/main/ to your program.
####Use gradle:
Step 1.Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.ChenTianSaber:MyToast:v0.11'
}
to display a finish Toast:
MyToast.finishToast(context,"FINISH!",Toast.LENGTH_SHORT).show();
to display a error Toast:
MyToast.errorToast(context,"ERROR!",Toast.LENGTH_SHORT).show();
to display a appreciate Toast:
MyToast.appreciateToast(context,"APPRECIATE!",Toast.LENGTH_SHORT).show();
to display a saved Toast:
MyToast.savedToast(context,"SAVED!",Toast.LENGTH_SHORT).show();
to display a delete Toast:
MyToast.deleteToast(context,"DELETE!",Toast.LENGTH_SHORT).show();
to display a normal Toast:
MyToast.NormalToast(context,"Normal",Toast.LENGTH_SHORT).show();
to custom a Toast:
MyToast.makeMyToast(context,String text,int image,int toastStyle,int duration)