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

Can not deselect immediately after a long press #6

Open
thadikari opened this issue Jan 5, 2019 · 0 comments
Open

Can not deselect immediately after a long press #6

thadikari opened this issue Jan 5, 2019 · 0 comments

Comments

@thadikari
Copy link

Hi, thanks for the much useful library!

Here's how to recreate a bug I spotted. (See the Current behavior gif below.)

  1. Start the demo app.
  2. Long press any tile (for example tile 0 hereafter) to switch to dragselect mode.
    Important: do not perform any drag gesture, just long press tile 0 till it becomes red.
  3. Without touching anything else click on tile 0 again.
    This click should deselect tile 0 (make it white again) but right now it does not happen.
  4. If tile 0 is clicked on again (two times including step 3) now it is deselected.

Desired behavior should be being able to deselect at the step 3 right?
I think bug is in the following line:

break; needs to be changed to return false;
Right now the function onInterceptTouchEvent will return true in the case MotionEvent.ACTION_DOWN: and the user does not receive an onClick event for the ViewHolder of tile 0 .

Current behavior:

Desired behavior:

@thadikari thadikari changed the title Can not unselect immediately after a long press Can not deselect immediately after a long press Jan 5, 2019
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

1 participant