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

Fix single click on cells #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean onSingleTapConfirmed(MotionEvent e) {
@Override
public boolean onDown(MotionEvent e) {
start = e;
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
// Get interacted view from x,y coordinate.
View childView = view.findChildViewUnder(e.getX(), e.getY());

if (childView != null && mGestureDetector.onTouchEvent(e)) {
if (childView != null) {
// Find the view holder
AbstractViewHolder holder = (AbstractViewHolder) mRecyclerView.getChildViewHolder
(childView);
Expand All @@ -72,6 +72,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
return false;
}

@Override
protected void longPressAction(MotionEvent e) {
// Consume the action for the time when either the cell row recyclerView or
// the cell recyclerView is scrolling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
// Get interacted view from x,y coordinate.
View childView = view.findChildViewUnder(e.getX(), e.getY());

if (childView != null && mGestureDetector.onTouchEvent(e)) {
if (childView != null) {
// Find the view holder
AbstractViewHolder holder = (AbstractViewHolder) mRecyclerView.getChildViewHolder
(childView);
Expand All @@ -64,6 +64,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
return false;
}

@Override
protected void longPressAction(MotionEvent e) {
// Consume the action for the time when the recyclerView is scrolling.
if (mRecyclerView.getScrollState() != RecyclerView.SCROLL_STATE_IDLE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
// Get interacted view from x,y coordinate.
View childView = view.findChildViewUnder(e.getX(), e.getY());

if (childView != null && mGestureDetector.onTouchEvent(e)) {
if (childView != null) {
// Find the view holder
AbstractViewHolder holder = (AbstractViewHolder) mRecyclerView.getChildViewHolder
(childView);
Expand All @@ -62,6 +62,7 @@ protected boolean clickAction(RecyclerView view, MotionEvent e) {
return false;
}

@Override
protected void longPressAction(MotionEvent e) {
// Consume the action for the time when the recyclerView is scrolling.
if (mRecyclerView.getScrollState() != RecyclerView.SCROLL_STATE_IDLE) {
Expand Down