Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

Toasty

> 编程语言
Open source

The usual Toast, but with steroids

6.6K stars0 likes0 views
WebsiteGitHub

About

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):

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

Dependency

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

gradle
dependencies {
	...
	implementation 'com.github.GrenderG:Toasty:1.5.2'
}

Configuration

This step is optional, but if you want you can configure some Toasty parameters. Place this anywhere in your app:

…

You can reset the configuration by using reset() method:

java
Toasty.Config.reset();

Usage

Each method always returns a Toast object, so you can customize the Toast much more. DON'T FORGET THE show() METHOD!

To display an error Toast:

java
Toasty.error(yourContext, "This is an error toast.", Toast.LENGTH_SHORT, true).show();

To display a success Toast:

java
Toasty.success(yourContext, "Success!", Toast.LENGTH_SHORT, true).show();

To display an info Toast:

java
Toasty.info(yourContext, "Here is some info for you.", Toast.LENGTH_SHORT, true).show();

To display a warning Toast:

java
Toasty.warning(yourContext, "Beware of the dog.", Toast.LENGTH_SHORT, true).show();

To display the usual Toast:

java
Toasty.normal(yourContext, "Normal toast w/o icon").show();

To display the usual Toast with icon:

java
Toasty.normal(yourContext, "Normal toast w/ icon", yourIconDrawable).show();

You can also create your custom Toasts with the custom() method:

java
Toasty.custom(yourContext, "I'm a custom Toast", yourIconDrawable, tintColor, duration, withIcon, 
shouldTint).show();

Extra

You can pass formatted text to Toasty!

There are variants of each method, feel free to explore this library.

Screenshots

Please click the image below to enlarge.

Third Party Bindings

React Native

You may now use this library with React Native via this module.

Apps using Toasty

Want to be here? Open an issue or make a pull request.

ColorHub - Color Palette
Daily – News flipped around
Oz! Comic Reader
Impactor Unroot
Fusemounter
BlueWords
Photo Map - Photo and Video Gallery
Maki for Facebook & Twitter
ModPE IDE
Rocket Notes
OpenHub for GitHub
openHAB
Saarang
Kad ce mi bus - red voznje
Hide Files
LogViewer for openHAB

Issues· 50 open

View all issuesOpen on GitHub
  • #201

    is this lib not working for Gradle 8.9??

    Updated Nov 28, 2024
  • #128

    Memory leak when allowQueue=false

    bughelp wantedUpdated Oct 9, 2024
  • #200

    is this lib deprecated in android API 34?

    Updated Feb 2, 2024
  • #182

    ToastyUtils.java line 1 es.dmoral.toasty.ToastyUtils.getDrawable

    Updated Jan 30, 2024
  • #198

    leaks 内存泄漏

    Updated May 25, 2023
  • #135

    Using this in my app :)

    promote my appUpdated Apr 17, 2023
  • #194

    Duration longer than Toast.LENGTH_LONG?

    Updated Jan 25, 2023
  • #195

    It didn't work

    Updated Dec 23, 2022
  • #165

    [Leak] Toast$TN leaking in Android 11

    Updated Nov 10, 2022
  • #160

    es.dmoral.toasty.ToastyUtils.getDrawable (ToastyUtils.java:55)

    Updated Oct 12, 2022

> Tags

Javaandroidtoastui-widget

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 24, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言