Android : IamToast Another Toast library for Android

Last update: Jun 12, 2022

Android : IamToast

Another Toast library for Android

Warning. toast custom view is deprecated since android 11(R)

alt text

Setup

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation 'com.github.kasamsun:iam-toast:1.0.2'
}

Usage

IamToast.info(this, "You have got mail. Please check your mail box.")

IamToast.normal(this, "Hello, world")

IamToast.success(this, "Transaction complete. Thank you.")

IamToast.warning(this, "Please enter more data to complete transaction.")

IamToast.error(this, "Server is busy. Please try again later.")

You can specify toast position [TOP,BOTTOM(default)] and duration [SHORT(default),LONG]

IamToast.normal(
    this,
    "Hello, world",
    IamToast.GRAVITY_TOP,
    IamToast.SHORT_DURATION
)

IamToast.normal(
    this,
    "Hello, world",
    IamToast.GRAVITY_BOTTOM,
    IamToast.LONG_DURATION
)

Style

There are 2 default style, inset and outset.

IamToast.apply {
    this.iconStyle = IamToast.ICON_STYLE_INSET
}

alt text

IamToast.apply {
    this.iconStyle = IamToast.ICON_STYLE_OUTSET
}

alt text

You can reset style to default

IamToast.resetStyle()

You can set color and icon you want

IamToast.apply {
    this.infoTitle = "ข้อความ"
    this.normalTitle = "ข้อความ"
    this.errorTitle = "ข้อผิดพลาด"
    this.successTitle = "ทำรายการเรียบร้อย"
    this.warningTitle = "แจ้งเตือน"
    this.iconStyle = IamToast.ICON_STYLE_INSET
    this.normalToastColor = R.color.brown_darken_3
    this.normalBackgroundToastColor = R.color.white
    this.infoToastColor = R.color.teal_darken_3
    this.infoBackgroundToastColor = R.color.white
    this.successToastColor = R.color.light_blue_darken_3
    this.successBackgroundToastColor = R.color.white
    this.warningToastColor = R.color.amber_darken_3
    this.warningBackgroundToastColor = R.color.white
    this.errorToastColor = R.color.deep_orange_darken_3
    this.errorBackgroundToastColor = R.color.white
    this.normalIcon = R.drawable.ic_sentiment_satisfied_24
    this.infoIcon = R.drawable.ic_sentiment_satisfied_alt_24
    this.successIcon = R.drawable.ic_sentiment_very_satisfied_24
    this.warningIcon = R.drawable.ic_sentiment_neutral_24
    this.errorIcon = R.drawable.ic_sentiment_very_dissatisfied_24
}

alt text

GitHub

https://github.com/kasamsun/iam-toast
You might also like...

Android Custom Toast

Android Custom Toast

Super Toast Library Written Purely in Kotlin ❤️ Usual Toast but with super powers!!! 💪 A Fully Customised and Customisable Toast. ]( https://android-

May 2, 2021

Android Toast For RTL Applications

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

Oct 19, 2021

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

Jun 23, 2022

Simple toast

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

Nov 5, 2021

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

Mar 19, 2022

This custom snack bar will help you display much more personalized app toast

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

May 31, 2022

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

Oct 27, 2021

Android library to create customizable floating animated toasts like in Clash Royale app

FloatingToast-Android An android library to make customisable floating animated toasts Getting Started In your build.gradle dependencies { impleme

May 31, 2022

A tooltip/showcase library for Android re-written in Kotlin.

UglyTooltip Based on another Showcase library. Being kotlinized, customized and refactored.

Apr 27, 2022
Related tags
A library that extends the Android toast framework.
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

Jun 21, 2022
🍞 The missing toast library for Android.
🍞 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

Dec 17, 2021
Toastie is a customizable Android toast library.
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

Apr 3, 2021
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

Feb 14, 2022
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

Nov 15, 2021
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

Jun 22, 2020
Custom Toast Library by Google Developer Student Club University of Brawijaya
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

Jun 1, 2022
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

Apr 22, 2022
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
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

Jun 19, 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

Jun 15, 2022