nicer animation flow for dismiss on swipe #135
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
...maybe "different" animation flow is a less opinionated term here.
snackbars are moved in from the bottom and are affixed to both screen edges (on non-tablet screens). I never quite liked how swiping the snackbar exposed the left or right edge, breaking its "full width, moved in from bottom" vibe. swiping it down to dismiss, as the guidelines say, is not very intuitive either.
this commit is a compromise which keeps side-swiping while keeping the edges fixed: swiping behavior is unchanged, but now only the content of the snackbar is moved, while the snackbar (i.e. its background) fades out but stays in place.
I tried different animations for actually dismissing the background afterwards, and fading it out the rest of the way felt better than moving it off the bottom of the screen for the swipe flow.
related note: your library has several advantages over the one from the support library, please keep maintaining it! 馃憤