From cec8d6a6ddfc29c530df5864794a5a0a2d2f3675 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Wed, 20 May 2015 11:31:51 -0700 Subject: [PATCH] Initialize down event with original down y position. Otherwise we could be issuing a list click event accidentally if the user raises their finger directly after the fake down event is produced. --- .../stickylistheaders/StickyListHeadersListView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java b/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java index aaf0a6ba..cd80f136 100644 --- a/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java +++ b/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersListView.java @@ -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();