Activity-independent Snackbar
Opened this issue · 2 comments
Feature request: snackbars are seemingly intended as replacements for toasts in Android. However, toasts are not dependent on Activities, they only need a Context, meaning that they can be used from services as well, for instance. Any thoughts about reworking Snackbars to match that behavior?
@deakjahn I haven't considered it before. Toasts are messages that are designed to appear to be floating on top of all views thus it makes sense they should be treated as independent messaging widgets. The Snackbar design makes the widget look more attached to a particular view. Don't you think?
The new design guidelines seem to prefer snackbars for things that originally called for a toast, I guess. ("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.") The real problem, as I found in my case, is when you want to show it much like attached but you need to do it from an independent service. The user would see it attached but you have no activity to link it to (unless, of course, you implement the usual workaround to keep track of your current activity from an Application, for instance).