Updated selection tracker

This commit is contained in:
M66B 2020-05-18 16:13:26 +02:00
parent b682be5d97
commit 09714714d2
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ public final class StableIdKeyProvider extends ItemKeyProvider<Long> {
}
return;
}
int position = holder.getAdapterPosition();
int position = holder.getAbsoluteAdapterPosition();
long id = holder.getItemId();
if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) {
mPositionToKey.put(position, id);
@ -102,7 +102,7 @@ public final class StableIdKeyProvider extends ItemKeyProvider<Long> {
}
return;
}
int position = holder.getAdapterPosition();
int position = holder.getAbsoluteAdapterPosition();
long id = holder.getItemId();
if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) {
mPositionToKey.delete(position);

View File

@ -263,7 +263,7 @@ final class ViewAutoScroller extends AutoScroller {
@Override
void scrollBy(int dy) {
if (VERBOSE) Log.v(TAG, "Scrolling view by: " + dy);
mView.scrollBy(0, dy);
mView.nestedScrollBy(0, dy);
}
@Override