Releases: nispok/snackbar
Releases · nispok/snackbar
Support for setText(@resId) methods
Listener for ListViews and RecyclerViews. Don't dismiss while swiping
You can attach the Snackbar
to a AbsListView (ListView, GridView) or a RecyclerView.
Snackbar.with(getApplicationContext()) // context
.type(Snackbar.SnackbarType.MULTI_LINE) // Set is as a multi-line snackbar
.text("This is a multi-line snackbar. Keep in mind that snackbars are " +
"meant for VERY short messages") // text to be displayed
.duration(Snackbar.SnackbarDuration.LENGTH_LONG)
.animation(false) // don't animate it
.attachToAbsListView(listView) // Attach to ListView - attachToRecyclerView() is for RecyclerViews
.show(this); // where it is displayed
A Snackbar
won't be dismissed while it is being swiped
Unique resource IDs
To avoid ID conflicts with resources from other projects and or libs, all resources IDs now have a prefix as suggested in the developer docs
Event listener & Swipe-to-Dismiss enabling/disabling
The previous DismissListener
has been changed to EventListener
. This listener now notifies whenever the Snackbar
is about to enter the screen and when it dismisses.
The Snackbar used on Google's Inbox app is not swipeable, but since the Material Design Guidelines says that a Snackbar can be swiped, this functionality may now be disabled with swipeToDismiss(false)
.
See the README file for the updated documentation.
Support for tablets/desktops
Support for tablets/desktops. See #7
Dismiss listener
v1.2.0 Version 1.2.0
Android Snackbar library
v1.0.0 Install fix