Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Fix offset error when ListView has headers, preventing swipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dhleong committed May 21, 2014
1 parent 1f84a61 commit 92fb640
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,9 @@ public boolean onTouchEvent(final MotionEvent ev) {
getLocationOnScreen(listViewCoords);
final int x = (int) ev.getRawX() - listViewCoords[0];
final int y = (int) ev.getRawY() - listViewCoords[1];
final int offset = Math.max(0, getHeaderViewsCount() - getFirstVisiblePosition());
View child;
for (int i = getHeaderViewsCount(); i < childCount; i++) {
for (int i = offset; i < childCount; i++) {
child = getChildAt(i);
if(child != null) {
child.getHitRect(rect);
Expand Down

0 comments on commit 92fb640

Please sign in to comment.