How to implement android L as a snack bar for below 4.2?
I went through the android L design guide and found a very intuitive way to display errors. Now I started to implement it in my application but didn't find any help on the internet.
I tried to search for an implementation of this type of pattern but found a library like croutons.
Are there any existing controls in android L to display the error shown in the above image, or will we implement our own?
EDIT
It's called SnackBar
+3
source to share
1 answer
Google has released a Design Support Library that contains SnackBar support.
To implement SnackBar use the below snippet
Snackbar
.make(parentLayout, R.string.snackbar_text, Snackbar.LENGTH_LONG)
.setAction(R.string.snackbar_action, myOnClickListener)
.show(); // Donβt forget to show!
0
source to share