The Material design website mentions a new Toast-like element called a Snackbar: http://www.google.com/design/spec/components/snackbars-and-toasts.html
The Android L preview SDK documentation (sorry can't link since it's only downloadable) doesn't have any mention of Snackbar in the classes list or as a modifier in the Toast class documentation. Am I missing something obvious or should I build my own Snackbar.java?
Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time.
Snackbars provide brief feedback about an operation through a message at the bottom of the screen. Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons. Toasts (Android only) are primarily used for system messaging.
Snackbars should be placed at the bottom of a UI, in front of app content.
Update 2015-05-29:
Google released a Design Support Library which includes a Snackbar and other Material Design widgets.
The Snackbar lib mentioned in the original answer is now deprecated.
Original answer
I'm sure Google will eventually include it in a future SDK, along with a Floating Action Button that is also missing in the preview SDK.
As @friedrich nietzche pointed out, I implemented a library to include a Snackbar
in your project.
https://github.com/nispok/snackbar
Hope it helps!
FWIW,
It would appear that there is no Snackbar
implementation in the L Developer Preview. I've also implemented a Snackbar library with the intentions of being as close to the material design guidelines as I can. Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With