CuteToast is an Material Design Custom Toast for Android | Custom Material Design Toast

Overview

CuteToast

platform API JitPack GitHub license

GitHub forks GitHub issues GitHub stars GitHub contributors

CuteToast

A material design Toast Library for Android

Purpose

CuteToast is an Android Custom Toast library that could be used instead of Default Toast. It does everything as Toast but with some extra spice.

CuteToast allows developers to use Toast with Colorful design and Icons. It's open-source and free to use. Give it a try.!

What's New

  • CuteToast without pre-built icon version added. Check the dependencies.

More changes in Release Tab.

Screenshots

Click to View High Quality

Screenshot

Prerequisites

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Dependencies

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	...
	implementation 'com.github.ahmmedrejowan.CuteToast:CuteToast:1.2'
}

If you want to use only Custom Background Options (no Pre-build Icons), then:

dependencies {
	...
	implementation 'com.github.ahmmedrejowan.CuteToast:CuteToast-Custom:1.2'

}

Usage

Each of the following method returns a Toast. Don't Forget to Call .show()

To display an Info Toast:

       CuteToast.ct(this, "This is a Info Toast", CuteToast.LENGTH_SHORT, CuteToast.INFO, true).show();

To display a Warning Toast:

       CuteToast.ct(this, "This is a Warning Toast", CuteToast.LENGTH_SHORT, CuteToast.WARN, true).show();

To display an Error Toast:

       CuteToast.ct(this, "This is a Error Toast", CuteToast.LENGTH_SHORT, CuteToast.ERROR, true).show();

To display a Success Toast:

       CuteToast.ct(this, "This is a Success Toast", CuteToast.LENGTH_SHORT, CuteToast.SUCCESS, true).show();

To display a Happy Toast:

       CuteToast.ct(this, "This is a Happy Toast", CuteToast.LENGTH_SHORT, CuteToast.HAPPY, true).show();

To display a Sad Toast:

       CuteToast.ct(this, "This is a Sad Toast", CuteToast.LENGTH_SHORT, CuteToast.SAD, true).show();

To display a Confuse Toast:

       CuteToast.ct(this, "This is a Confuse Toast", CuteToast.LENGTH_SHORT, CuteToast.CONFUSE, true).show();

To display a Delete Toast:

       CuteToast.ct(this, "This is a Delete Toast", CuteToast.LENGTH_SHORT, CuteToast.DELETE, true).show();

To display a Save Toast:

       CuteToast.ct(this, "This is a Save Toast", CuteToast.LENGTH_SHORT, CuteToast.SAVE, true).show();

To display a Normal Toast:

       CuteToast.ct(this, "This is a Normal Toast", CuteToast.LENGTH_SHORT, CuteToast.NORMAL, true).show();

If you don't want the Icons:

Replace true to false at the end of the statment.

       CuteToast.ct(this, "This is a Info Toast", CuteToast.LENGTH_SHORT, CuteToast.INFO, false).show();
       CuteToast.ct(this, "This is a Error Toast", CuteToast.LENGTH_SHORT, CuteToast.ERROR, false).show();

and same for the other types too.

Or Just Remove the last boolean part

       CuteToast.ct(this, "This is a Info Toast", CuteToast.LENGTH_SHORT, CuteToast.INFO).show();
       CuteToast.ct(this, "This is a Error Toast", CuteToast.LENGTH_SHORT, CuteToast.ERROR).show();

If you want to use Custom Icons:

        CuteToast.ct(this, "This is an Info Toast with Custom Star Icon", CuteToast.LENGTH_SHORT, CuteToast.INFO, R.drawable.ic_star).show();
        CuteToast.ct(this, "This is an Error Toast with Custom Danger Icon", CuteToast.LENGTH_SHORT, CuteToast.ERROR, R.drawable.danger_ic).show();

Notes

  • If this shows an error, then replace it with MyActivity.this where MyActivity is your activity name.
  • Durations are CuteToast.LENGTH_SHORT and CuteToast.LENGTH_LONG .
  • Total 10 Background Desings are available:
    • INFO
    • WARN
    • ERROR
    • SUCCESS
    • HAPPY
    • SAD
    • CONFUSE
    • DELETE
    • SAVE
    • NORMAL
  • Icon Options:
    • If icon is true, then pre-built icons will be shown
    • If 'icon is 'false or 'boolean' is removed, then no icon will be shown
    • If 'icon' is added by using R.drawabale.icon_name , then custom icon will be shown.
  • If you use the Custom Dependency (implementation 'com.github.ahmmedrejowan.CuteToast:CuteToast-Custom:1.1) then you can't use the pre-built icons.

Contribute

Please fork this repository and contribute back using pull requests.

Any contributions, large or small, major features, bug fixes, are welcomed and appreciated but will be thoroughly reviewed .

Let me know which features you want in the future in Request Feature tab.

If this project helps you a little bit, then give a to Star the Repo.


Credits

Created with Love by K M Rejowan Ahmmed (@ahmmedrejowan)

Reach me @

License

Copyright 2021 K M Rejowan Ahmmed (ahmmedrejowan)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

You might also like...
Attractive, stylish and customizable toast library for Android.

FabToast min SDK 16 (Jelly Bean 4.1) written in Java To download the demo app for this library from Google Playstore so you can see it in action, clic

Customizable toast message library for Android
Customizable toast message library for Android

Android Custom Toast Message (SnToast) Customizable Toast Message Library For Android Add this in your root build.gradle file allprojects { reposito

The usual Toast, but with steroids 💪
The usual Toast, but with steroids 💪

Toasty The usual Toast, but with steroids. Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { r

Simple toast

newlibrary Simple toast Step 1. Add the JitPack repository to your build file allprojects { repositories { ... maven { url 'https://jitpack.io

 An easy, flexible way to have the toast message displayed.
An easy, flexible way to have the toast message displayed.

IToaster Library An easy, flexible way to have the toast message displayed. Download Gradle Add below codes to your root build.gradle file (not your m

MDToast - MaterialDesign Toast library written with Kotlin with lots of extensions to interact easily in contexts
MDToast - MaterialDesign Toast library written with Kotlin with lots of extensions to interact easily in contexts

MDToast - MaterialDesign Toast A lightweight Toast library written with Kotlin i

Pretty material design toasts with feedback animations
Pretty material design toasts with feedback animations

Load Toast Library The default toasts are ugly and don't really provide much more than a short message. This small library provides a better toast whi

Custom toasts with color and icon for Android.
Custom toasts with color and icon for Android.

Dynamic Toasts A simple library to display themed toasts with icon and text on Android 2.3 (API 9) and above devices. Since v0.4.0, it uses 26.x.x sup

An android library for easy implementation of Toasts in Android with easy customisation.
An android library for easy implementation of Toasts in Android with easy customisation.

ToastTypeDecore ©️ A library for easy implementation of Toasts in Android with easy customisation. Latest Version : v2.1 Screenshots Success Toast1 Su

Releases(1.2)
Owner
K M Rejowan Ahmmed
It's time to code
K M Rejowan Ahmmed
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.

CoolToast A really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary

null 21 Dec 20, 2022
Custom Toast Library by Google Developer Student Club University of Brawijaya

GDSCToast Custom Toast Library by Google Developer Student Club University of Brawijaya Prerequisites For old version of gradle (before arctic fox upd

Kylix Eza S 6 Sep 15, 2022
This custom snack bar will help you display much more personalized app toast

?? Presentation Using the native android class of snack bar. This custom snack bar will help you display much more personalized app

Xavi 4 Dec 8, 2022
Android : IamToast Another Toast library for Android

Android : IamToast Another Toast library for Android Warning. toast custom view is deprecated since android 11(R) Setup allprojects { repositories

null 2 Jun 12, 2022
A library that extends the Android toast framework.

SuperToasts Library The SuperToasts library enhances and builds upon the Android Toast class. This library includes support for context sensitive Supe

John Persano 2.7k Dec 29, 2022
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).

Android AppMsg (Crouton) Library Implementation of in-layout notifications. Based on Toast notifications and article The making of Prixing #4: in-layo

Evgeny Shishkin 1.4k Nov 25, 2022
An Android Toast replacement, similar to the one seen in the GMail app.

MessageBar An Android Toast replacement, similar to the one seen in the GMail app. Multiple messages can be posted in succession, and each message wil

Simon Vig Therkildsen 555 Nov 25, 2022
🍞 The missing toast library for Android.

Literally Toast ?? A toast library for Android. Usage: ?? Use the LitToast to get lit and show your users a proper toast. LitToast.create(context, "My

David Voiss 229 Nov 25, 2022
Toastie is a customizable Android toast library.

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

Burak Fidan 36 Apr 3, 2021
Android Toast For RTL Applications

RTL-Toast Android library to show Toasts in a pretty RTL way Install Add it in your root build.gradle allprojects { repositories { ... ma

Arash Hatami 15 Nov 16, 2022