Java version of MotionToast 🔥
This is the first Java version of MotionToast by Lazy-pr0grammer.
Don't forget to check Spikeysanju's library also: Spikeysanju's MotionToast
A beautiful Toast library in Android Java ♨️
- Added round corner support for Light full color toasts.
- Made it more easy for everyone.
- Removed old fonts and added new fonts.
- Now the library is more easy-to-use.
Step 1: Add the JitPack repository to your build file
Add it in your root build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven {
url 'https://jitpack.io'
}
}
}
Add dependency in your app module
dependencies {
implementation 'com.github.lazy-pr0grammer:MotionToast-Easiotic:1.2'
}
1. MotionStyle.SUCCESS
2. MotionStyle.WARNING
3. MotionStyle.ERROR
4. MotionStyle.INFO
5. MotionStyle.DELETE
1. MotionStyle.LENGTH_SHORT //3 seconds
2. MotionStyle.LENGTH_LONG //4 seconds
1. MotionStyle.LIGHT
2. MotionStyle.DARK
1. MotionStyle.TOP
2. MotionStyle.CENTER
3. MotionStyle.BOTTOM
1. 0 //Zero is for full color Toast
2. 1 //One is for transparent color Toast
MotionToast motionToast = new MotionToast(
MainActivity.this,
0,
MotionStyle.LIGHT,
MotionStyle.SUCCESS,
MotionStyle.BOTTOM,
"SUCCESS",
"You got succeed :)",
MotionStyle.LENGTH_SHORT
);
motionToast.show();
MotionToast motionToast = new MotionToast(
MainActivity.this,
1,
MotionStyle.LIGHT,
MotionStyle.SUCCESS,
MotionStyle.BOTTOM,
"SUCCESS",
"You got succeed :)",
MotionStyle.LENGTH_SHORT
);
motionToast.show();
MotionToast motionToast = new MotionToast(
MainActivity.this,
0,
MotionStyle.DARK,
MotionStyle.SUCCESS,
MotionStyle.BOTTOM,
"SUCCESS",
"You got succeed :)",
MotionStyle.LENGTH_SHORT
);
motionToast.show();
MotionToast motionToast = new MotionToast(
MainActivity.this,
1,
MotionStyle.DARK,
MotionStyle.SUCCESS,
MotionStyle.BOTTOM,
"SUCCESS",
"You got succeed :)",
MotionStyle.LENGTH_SHORT
);
motionToast.show();
Thank you for exploring MotionToast-Easiotic!
Happy coding! 🚀