Android Studio- Toast Messages with some Effects :)
Getting bored with old simple looking Toast Messages. So here I am presenting some amazing toast message style's for you.
- Note: Here, I only show you the one text style other you can try.
- Special Thanks to GrenderG for making these toast style's.
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
implementation 'com.github.GrenderG:Toasty:1.3.0'
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_centerVertical="true"
android:id="@+id/button"
android:text="This is Toast Button"
/>
Button b1;
b1=(Button)findViewById(R.id.button);
b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toasty.error(MainActivity.this,"This is Error Message", Toast.LENGTH_LONG).show();
}
});