Description
Toastie is a customizable Android toast library.
Toastie alternatives and similar packages
Based on the "Toast Widget" category.
Alternatively, view Toastie alternatives based on common mentions on social networks and blogs.
-
Android-AppMsg
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773). -
MessageBar
An Android Toast replacement, similar to the one seen in the GMail app. -
FloatingToast-Android
Android library to create customizable floating animated toasts like in Clash Royale app -
CoolToast
A really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary...etc ), or with rounded corners, or event with image. -
FabToast
Attractive, stylish and customizable toast library for Android.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Toastie or a related project?
README
Toastie
Getting Started
Gradle
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle
at the end of repositories:
Note: Please check above for the latest version!
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.MrNtlu:Toastie:latest.version'
}
Maven
Step 1. Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Step 2. Add the dependency
<dependency>
<groupId>com.github.MrNtlu</groupId>
<artifactId>Toastie</artifactId>
<version>latest.version</version>
</dependency>
Usage
Warning Toast:
Toastie.warning(MainActivity.this,"Warning Toast", Toast.LENGTH_LONG).show();
Toastie.centerWarning(MainActivity.this,"Warning Toast", Toast.LENGTH_LONG).show();
Toastie.topWarning(MainActivity.this,"Warning Toast", Toast.LENGTH_LONG).show();
Success Toast:
Toastie.success(MainActivity.this,"Success Toast",Toast.LENGTH_LONG).show();
Toastie.centerSuccess(MainActivity.this,"Success Toast",Toast.LENGTH_LONG).show();
Toastie.topSuccess(MainActivity.this,"Success Toast",Toast.LENGTH_LONG).show();
Info Toast:
Toastie.info(MainActivity.this,"Info Toast.",Toast.LENGTH_LONG).show();
Toastie.centerInfo(MainActivity.this,"Info Toast.",Toast.LENGTH_LONG).show();
Toastie.topInfo(MainActivity.this,"Info Toast.",Toast.LENGTH_LONG).show();
Error Toast:
Toastie.error(MainActivity.this,"Error Toast.",Toast.LENGTH_LONG).show();
Toastie.centerError(MainActivity.this,"Error Toast.",Toast.LENGTH_LONG).show();
Toastie.topError(MainActivity.this,"Error Toast.",Toast.LENGTH_LONG).show();
Custom Toast:
Toastie.custom(MainActivity.this,"Custom Toast.",R.drawable.icon,R.color.background,Toast.LENGTH_LONG).show();
Toastie.centerCustom(MainActivity.this,"Custom Toast.",R.drawable.icon,R.color.background,Toast.LENGTH_LONG).show();
Toastie.topCustom(MainActivity.this,"Custom Toast.",R.drawable.icon,R.color.background,Toast.LENGTH_LONG).show();
Fully customizable toast, you can set the attributes that you need.
Toastie.allCustom(MainActivity.this)
.setTypeFace(Typeface.DEFAULT_BOLD)
.setTextSize(16)
.setCardRadius(25)
.setCardElevation(10)
.setIcon(R.drawable.ic_error_black_24dp)
.setCardBackgroundColor(R.color.colorAccent)
.setMessage("Fully customizable toast. But in a different way.")
.setGravity(Gravity.CENTER,5,5)
.createToast(Toast.LENGTH_LONG)
.show();
Same as previous one but different way calling it.
Toastie.allCustom(MainActivity.this,"Fully custom toast. Ugly as ... :)",R.drawable.ic_info_black_36dp,
R.color.infoColor,cornerRadius,elevation,textSize,Typeface.SANS_SERIF,Gravity.TOP, xOffset,yOffset,Toast.LENGTH_LONG).show();