Releases: nispok/snackbar
Releases · nispok/snackbar
Adding ability for Snackbar's to have margins, custom backgrounds, and be positioned at the top of the container
Adding ability for Snackbar's to have margins, custom backgrounds, and be positioned at the top of the container. See #84
Add swipe to dismiss listener
A new ActionSwipeListener
has been included to indicate when a Snackbar
has been dismissed by swiping. See #85 for more details
Attach to non-Activity's root view
- You can attach a Snackbar to a non-root Activity view. This closes #62 and provides a workaround for #76 and #27. The following methods are now included as part of the
SnackbarManager
:
SnackbarManager.show(Snackbar snackbar, ViewGroup parent)
andSnackbarManager.show(Snackbar snackbar, ViewGroup parent, boolean usePhoneLayout)
- Navigation bar handling has been improved. Fixing #45. See #80 for more detail and the latest demo for more detail
- An
EventListenerAdapter
is provided to avoid boilerplate code if you only need to override a subset ofEventListener
. See #81
2.8.0
- A Snackbar's action button can only be tapped once by default. If you really need the action button to be tapped multiple times (can't think of an scenario where you would want this) you have to set explicitly set this behavior
Snackbar.with(context).allowMultipleActionClicks(true);
- A method
isActionClicked()
is now provided to let you know if the action button was tapped. This is useful if you want to know during the Snackbar dimissal if it's being dismissed because the action was tapped or just ran out of time. See #73 - The EventListener has been extended with a couple of calls:
onShowByReplace
andonDismissByReplace
. This is useful if you need to NOT move a Floating Action Button down and up while the Snackbar is just being replaced, but still wanted to move up and down on regular show/dismiss callbacks. See #79 - Support for translucent navigation bar. For translucent navigation bars, their height size is added in the Snackbar's bottom padding. The sample app illustrates this
- A bug has been fixed when the configured color for either the background, text, or action text was white. Prior to this version, the color code #ffffffff was always ignored. See #67 and this SO question
Custom Typefaces
Possible memory leak fix
Bug fix on APIs < 16
Height offset was always applied to APIs < 16. Offset should never be applied for these cases. See #57
6" Phones not Considered Tablets Anymore
Allow dismissing from SnackbarManager
Allow Indefinite Duration
SnackbarDuration.INDEFINITE
was added as a SnackbarDuration
which would keep it on screen indefinitely, needing to be dismissed by swipe or action. See #46