Skip to content

Mobile Android-App Toastify(Notification and Message) - Show Android Toast in Singleton design pattern with queue.

License

Notifications You must be signed in to change notification settings

collegedunia-com/Toastify

Repository files navigation

Jitpack

Android Toastify

Show Android Toast in Singeton design pattern with queue.

Features

  • If multiple same toast are generated simultaneously, all toasts will be merged into one. Currently all the toasts shows one after another, creating bad UX.
  • If multiple different toasts are generated, it will be displaced in a queue on after another.

Step 1

Gradle

Add to root project gradle

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

Add dependency to app gradle

implementation 'com.github.collegeduniadevelopers:Toastify:Tag'

Step 2

Show Toast

ToastGenerate.getInstance(context)
            .createToastMessage(ToastModel(type: ToastType,title: String, message: String?, leftImg: Drawable?, length: ToastLength? = ToastLength.SHORT))

ToastType:

  1. ToastType.SUCCESS
  2. ToastType.NORMAL
  3. ToastType.ERROR
  4. ToastType.WARNING

ToastLength:

  1. ToastLength.SHORT
  2. ToastLength.LONG

Screenshots:

  1. Success
  2. Normal
  3. Error
  4. Warning

That's pretty much it. Thanks

About

Mobile Android-App Toastify(Notification and Message) - Show Android Toast in Singleton design pattern with queue.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages