* commit '7e683ec6a53b1581671ce72782e7b25a0ae705d0': FastScroller: Fix to use appropriate index
This commit is contained in:
committed by
Android Git Automerger
commit
9058a6c881
@@ -676,8 +676,13 @@ class FastScroller {
|
||||
|
||||
final int section = mSectionIndexer.getSectionForPosition(firstVisibleItem);
|
||||
final int sectionPos = mSectionIndexer.getPositionForSection(section);
|
||||
final int nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
|
||||
final int nextSectionPos;
|
||||
final int sectionCount = mSections.length;
|
||||
if (section + 1 < sectionCount) {
|
||||
nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
|
||||
} else {
|
||||
nextSectionPos = totalItemCount - 1;
|
||||
}
|
||||
final int positionsInSection = nextSectionPos - sectionPos;
|
||||
|
||||
final View child = mList.getChildAt(0);
|
||||
|
||||
Reference in New Issue
Block a user