Android - Snackbar vs Toast - usage and difference

Jakub Holovsky picture Jakub Holovsky · Dec 23, 2015 · Viewed 58.7k times · Source

We have been using just Toasts in our application so far and as we are planning to adopt some new features from Support Design Library I am wondering what's the recommended usage for Snackbar vs. Toast.

I have been reading on the google material snackbar doc.

Snackbars provide lightweight feedback about an operation in a small popup at the base of the screen on mobile and at the lower left on desktop. They are above all over elements on screen, including the FAB.

and toasts.

Android also provides a capsule-shaped toast, primarily used for system messaging. Toasts are similar to snackbars but do not contain actions and cannot be swiped off screen.

I understand what they do but I am a bit confused when to use what. Does it mean that:

  • If I don't require user interaction I would use a toast?
  • What is meant by "system messaging"? Does that apply to displaying information when something important happened between my app and the Android system?
  • What I like is the swipe off screen feature - would that be a reason to start replacing toasts with snackbars? (this is a bit opinion based question though)

Answer

If I don't require user interaction I would use a toast?

You can still use Snackbar. It is not mandatory to have an action with Snackbar.

What is meant by "system messaging"? Does that apply to displaying information when something important happened between my app and the Android system?

I believe this means that Toasts are to be used if there are some messages pertaining to the system. Either android as a whole or some background service you may be running. E.g. Text-To-Speech is not installed. OR No Email client found.

What I like is the swipe off screen feature - would that be a reason to start replacing toasts with Snackbar? (this is a bit opinion based question though)

That is one reason. But there are several other plus points. For an example: Your toast remains on screen even when the activity is finished. Snackbar doesn't. There is less confusion if the toast does not popup (or keep popping up in case of multiple Toast creation in sequence) long after the app is exited. This will not happen with Snackbar.

More than everything: I suggest if you are thinking, you should switch. SnackBars look far better than Toasts.