Let's build a Firefox extension with Kotlin

Create Custom Android Toast Using TastyToast Library

We all use Android Toast in our application and definitely bored with native Android Toast. You can see many way to create custom Toast for your Android application. But today i am showing you a great Android Library which helps an user to get rid of their native Android Toast.

TastyToast helps the user by characterising the type of Toast into five main category which are success, danger, warning, info and default.

  • For each default category, it not only changes background and text colour but also adds tasty Custom View on the left side of Toast.

The library provides flexibility to customize text color, background of Toast and has specific toast icon for each category.

Recommended article:

How to create custom Android Toast using TastyToast

It very easy to use lets show first demo then we dive with code:

Preview

Demo success - TastyToast Android Custom Toast LibraryDemo warning - TastyToast Android Custom Toast Library



Demo error - TastyToast Android Custom Toast LibraryDemo info - TastyToast Android Custom Toast Library Demo default - TastyToast Android Custom Toast Library Demo confusion - TastyToast Android Custom Toast Library

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dependency

Add dependency in your app module

dependencies { compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1' }

Usage

Java

TastyToast.makeText(getApplicationContext(), "Hello World !", TastyToast.LENGTH_LONG, TastyToast.WARNING);

Last parameter here is the type of toast you want to show.

Thats it how easy it is. Isn’t it ? Please tell us in comment with your thoughts.

The post Create Custom Android Toast Using TastyToast Library appeared first on Tell Me How - A Place for Technology Geekier.

Comments