Toastest

General

Category
Free
Tag
Toasts
License
N/A
Min SDK
17 (Android 4.2 Jelly Bean)
Registered
Feb 8, 2019
Favorites
1
Link
https://github.com/ZahraHeydari/Toastest
See also
Load Toast Library
ToastLibrary
Notti
Quicktoast
MyCustomToast

Additional

Language
Kotlin
Version
1.0.0 (Sep 8, 2018)
Created
Sep 8, 2018
Updated
Sep 8, 2018
Owner
ZARA (ZahraHeydari)
Contributor
ZARA (ZahraHeydari)
1
Activity
Badge
Generate
Download
Source code
APK file

Blurb

Toastest

This is for customizing toasts!

Prerequisites

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

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

dependencies {
 ...
 implementation 'com.github.ZahraHeydari:Toastest:1.0.0'
}

Usage

Each method always returns a Toast object, so you can customize the Toast with below methods.

This displays a Toast with an icon.

Toastest.makeToast(context, "This is a toast with an icon.", iconDrawable,Toast.LENGTH_SHORT).show()

This displays a Toast with a new background.

Toastest.makeToast(context, background, "This a toast with a background.", Toast.LENGTH_SHORT).show()

This displays a Toast with a new font type.

Toastest.makeToast(context, "This a toast with a new font type.", TEXT_TYPEFACE, Toast.LENGTH_SHORT).show()

This displays a Toast with a new text size.

Toastest.makeToast(context, "This a toast with a new text size.", TEXT_SIZE, Toast.LENGTH_SHORT).show()

And you can create your custom Toasts with the custom() method:

Toastest.custom(context, "This is a fully customized toast.", iconDrawable, backgroundDrawable, TEXT_SIZE, TEXT_TYPEFACE, Toast.LENGTH_SHORT).show()

Author

  • ZARA