Using this
mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
Only detects for single tap event i.e. quick tap and release.
If i hold down and then release, onSingleTapUp
is not called.
I am looking for an motion event which is ACTION_UP
after holding down.
I looked at onShowPress
which is called when the user performs a down action but then I was not sure how to detect a ACTION_UP
while in onShowPress
.
Note this is for a recycler view
to click items. At the moment, I can single tap an item which works but if I hold it down and then release, it is not invoked.
You may try the following in your
onSingleTapUp
method: