Although most of the toast notifications libraries are someway deprecated in favor of the new Design Support Library which includes a Toast. It is due to this that development of many libraries are no longer actively being maintained, however they work pretty nice (and there are other projects that are still being maintained)! If you are looking for a recommendation of which third party library you should use to implement custom toast notifications in Android, you are in the right place.
In this top, we'll share with you 7 of the most imponent libraries to build custom/default toasts notifications to display in your native android application.
7. Dynamic Toasts
A simple library to display themed toasts with icon and text on Android 9+ (Gingerbread or above) devices. Since v0.4.0, it uses 26.x.x support libraries so, minimum SDK will be Android 14+ (ICS or above). Since v2.0.0, it uses AndroidX so, first migrate your project to AndroidX. It has several method to display toasts based on the requirement. Each method returns a Toast object which can be customised further. Optional configuration to customise the toasts further like custom background color or drawable, custom text size, typeface or icon size, etc. Various methods can be called anywhere in the app to do customisations.
6. Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
5. SimpleToast
SimpleToast is a notification library for Android (like a Toast). The API is kept as simple as the Toast API. Create a SimpleToast for any CharSequence with default icon:
4. StyleableToast
StyleableToast is an Android library that takes the standard toast to the next level with many styling options. Style your toasts either by code or with a style in styles.xml
.
3. TastyToast
TastyToast is an useful library that implements custom Android toasts that look beautiful and not so boring as the native ones. After installing the library, you can use the toasts like this:
2. SuperToasts
The SuperToasts library enhances and builds upon the Android Toast class. This library includes support for context sensitive SuperActivityToasts that can show progress and handle button clicks as well as non-context sensitive SuperToasts which offer many customization options over the standard Android Toast class. You can create a super toast like this:
1. Toasty
Toasty is a simple android library that allows you to use the usual Toast, but with steroids. You can add this to your module's build.gradle
file (make sure the version matches the JitPack) and that's it. Each method always returns a Toast object, so you can customize the Toast much more. To display an error Toast:
To display a success Toast:
To display an info Toast:
To display a warning Toast:
To display the usual Toast:
To display the usual Toast with icon:
You can also create your custom Toasts with the custom() method:
If you know another awesome open source library that allows you to implement toast like notifications in your android native application, please share it with the community in the comment box.
0 Comments