Skip to content

Commit

Permalink
revert fix for deprecated method to avoid crash for older recyclervie…
Browse files Browse the repository at this point in the history
…w version
  • Loading branch information
yqritc committed Apr 16, 2015
1 parent 21e70e2 commit a3e9d9e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state)
int childCount = mShowLastDivider ? parent.getChildCount() : parent.getChildCount() - 1;
for (int i = 0; i < childCount; i++) {
View child = parent.getChildAt(i);
int childPosition = parent.getChildAdapterPosition(child);
int childPosition = parent.getChildPosition(child);
if (mVisibilityProvider.shouldHideDivider(childPosition, parent)) {
continue;
}
Expand Down Expand Up @@ -114,7 +114,7 @@ public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state)

@Override
public void getItemOffsets(Rect rect, View v, RecyclerView parent, RecyclerView.State state) {
int position = parent.getChildAdapterPosition(v);
int position = parent.getChildPosition(v);
setItemOffsets(rect, position, parent);
}

Expand Down

0 comments on commit a3e9d9e

Please sign in to comment.