Skip to content

Commit

Permalink
The FastScroller is not working properly.
Browse files Browse the repository at this point in the history
If you have a large number of contacts in the last section of contacts list,
when you scroll the list, the fast scroll bar will work improperly, it will scroll back.

The reason is that when we scroll to the last section, the next position of the next section is -1 but not the count of the contacts.

Change-Id: I058b3e6c88e8aaeabbfed291296e02dfd775018e
  • Loading branch information
ranzhengyuan authored and zephiK committed Feb 27, 2015
1 parent f89d2a5 commit 415148e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ public Object[] getSections() {
}

public int getPositionForSection(int section) {
if (section < 0 || section >= mSections.length) {
if (section < 0 || section > mSections.length) {
return -1;
} else if (section == mSections.length) {
return mCount;
}

return mPositions[section];
Expand Down

0 comments on commit 415148e

Please sign in to comment.