Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fixed onItemMoved callback with headerviews
Browse files Browse the repository at this point in the history
  • Loading branch information
nhaarman committed Feb 22, 2014
1 parent 3042756 commit bf18398
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private void makeCellMobile() {
int position = pointToPosition(mDownX, mDownY);
int itemNum = position - getFirstVisiblePosition();
View selectedView = getChildAt(itemNum);
if (selectedView == null || position < getHeaderViewsCount() || position >= getAdapter().getCount() - getHeaderViewsCount()) {
if (selectedView == null || position < getHeaderViewsCount() || position >= getAdapter().getCount() - getHeaderViewsCount()) {
return;
}

Expand Down Expand Up @@ -593,7 +593,7 @@ public void onAnimationEnd(Animator animation) {
setEnabled(true);
invalidate();
if (mOnItemMovedListener != null) {
mOnItemMovedListener.onItemMoved(mLastMovedToIndex);
mOnItemMovedListener.onItemMoved(mLastMovedToIndex - getHeaderViewsCount());
}
}
});
Expand Down

0 comments on commit bf18398

Please sign in to comment.