Skip to content

Commit

Permalink
fix onBindViewHolder
Browse files Browse the repository at this point in the history
  • Loading branch information
limedroid committed Jun 15, 2018
1 parent 2971bb5 commit d2447fc
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
}
}

@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, List<Object> payloads) {
int headViewSize = getHeaderSize();
if (position >= headViewSize && (position < headViewSize + getDataCount())) {
baseAdapter.onBindViewHolder(holder, position - headViewSize, payloads);
}
}

@Override
public int getItemCount() {
return getHeaderSize() + getDataCount() + getFooterSize();
Expand Down

0 comments on commit d2447fc

Please sign in to comment.