Skip to content

Can not deselect immediately after a long press #6

@thadikari

Description

@thadikari

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions