Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to disable swipe gesture. #9

Closed
tasomaniac opened this issue Oct 24, 2014 · 7 comments
Closed

Ability to disable swipe gesture. #9

tasomaniac opened this issue Oct 24, 2014 · 7 comments

Comments

@tasomaniac
Copy link

I believe it is not defined in the Material Design Guideline. And the new inbox application does not do it. You cannot swipe there. I think it shouldn't be enabled by default.

@wmora
Copy link
Contributor

wmora commented Oct 24, 2014

From the guideline:

They automatically disappear after a timeout or after user interaction elsewhere on the screen, whichever comes first. Snackbars can be swiped off screen. They do not block input on the screens they appear on and cannot receive input focus. Show only one snackbar on screen at a time.

Can they be swiped off in any way on the new inbox app? I don't have it yet.

@tasomaniac
Copy link
Author

Ok sorry about that. Guidelines tells that they can.
But in the Inbox app they cannot be swiped. They disappear after a timeout our when you interact with the list. For example when you scroll the list.

@wmora
Copy link
Contributor

wmora commented Oct 25, 2014

I see, thanks for the info. We should add two things:

  • Support to enable/disable the swipe-to-dismiss functionality. I wonder if it should be enabled by default
  • Dismiss the snackbar with any touch event outside of it

@tasomaniac
Copy link
Author

If you ask me the default behaviour is not important as long as it can be disabled.

Do you think we can understand the outside touch events? It can be left to the developer.

And when there is a Floating Action Button, SnackBar moves it upward a little bit to not to cross. Do you think it can be added as well?

@wmora
Copy link
Contributor

wmora commented Oct 25, 2014

I'll look into understanding outside touch events, but you are right it can be left to the developer.

Regarding the FAB, since the Snackbar doesn't have any control over it, what we can do is tell a listener when the Snackbar is about to enter the screen and specify its height in order for the caller to take proper action (move the FAB up, for example).

@wmora
Copy link
Contributor

wmora commented Oct 25, 2014

Just uploaded v1.4.0 with these changes except for the outside touch events. The README is updated with this info

@tasomaniac
Copy link
Author

Wow that was quick, I will take a look at it. Thank you

On Sat, Oct 25, 2014, 11:07 AM William Mora notifications@github.com
wrote:

Just uploaded v1.4.0
https://oss.sonatype.org/content/repositories/releases/com/williammora/snackbar/1.4.0/
with these changes except for the outside touch events. The README is
updated with this info


Reply to this email directly or view it on GitHub
#9 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants