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

UndoHelper dismissed quickly with Snackbar predefined lengths. #265

Closed
inorichi opened this issue Jan 13, 2017 · 1 comment
Closed

UndoHelper dismissed quickly with Snackbar predefined lengths. #265

inorichi opened this issue Jan 13, 2017 · 1 comment

Comments

@inorichi
Copy link

inorichi commented Jan 13, 2017

In this line, 400ms are added to undoTime to compensate animations.

When using Snackbar#LENGTH_LONG or Snackbar#LENGTH_SHORT (valid values according to the documentation), the snackbar is dismissed almost instantly because its values are 0 and -1.

This could be fixed by using undoTime > 0 ? undoTime + 400 : undoTime or directly comparing those two options. Maybe you could also make the @IntRange annotation start from -1.

@inorichi inorichi changed the title UndoHelper dismissed quickly with Snackbar predefined lenghts. UndoHelper dismissed quickly with Snackbar predefined lengths. Jan 13, 2017
@davideas davideas added the bug label Jan 13, 2017
@davideas davideas added this to the 5.0.0-rc1 milestone Jan 13, 2017
@davideas
Copy link
Owner

davideas commented Jan 13, 2017

@inorichi, yes, thanks!

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

No branches or pull requests

2 participants