Skip to content

Commit

Permalink
Initialize down event with original down y position.
Browse files Browse the repository at this point in the history
Otherwise we could be issuing a list click event accidentally if the user raises their finger directly after the fake down event is produced.
  • Loading branch information
Emil Sjolander committed May 20, 2015
1 parent 6703372 commit cec8d6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
cancelEvent.recycle();
}

MotionEvent downEvent = MotionEvent.obtain(ev);
MotionEvent downEvent = MotionEvent.obtain(ev.getDownTime(), ev.getEventTime(), ev.getAction(), ev.getX(), mDownY, ev.getMetaState());
downEvent.setAction(MotionEvent.ACTION_DOWN);
handled = mList.dispatchTouchEvent(downEvent);
downEvent.recycle();
Expand Down

0 comments on commit cec8d6a

Please sign in to comment.