Stale Android Toasts made tasty.
Android Toasts are amazing, but they have a few major drawbacks:
You cannot control when they show up as well as their duration. Other apps can enqueue toasts that will delay yours from showing up.
They break context: they remain on screen when the user switches to other activities.
The API is error prone: Toast.makeText(context, "Important Toast", LENGTH_LONG); // Don't forget show()!
FrenchToast gives you absolute control over your app Toasts. It does so by duplicating the internals of Android Toasts and giving you access.
Unlike other Toast-like libraries, FrenchToast doesn't add a view to the root of your activity. Instead, it creates a new Window for each Toast, exactly like the real Android Toasts.
Crafting your own Mixture
If you want more control over when to show / hide Toasts, you can directly use
Toast toast = Toast.makeText(context, "BREAD ALL THE THINGS!", LENGTH_SHORT); Mixture mixture = Mixture.dip(toast); // The Toast is shown forever, as long as the process lives: mixture.show(); // Or until you call hide: mixture.hide();