Merge "Fixing wrong index passed when highlighting a preference during scroll" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2018-10-13 02:13:43 +00:00 committed by Android (Google) Code Review
commit 367f8f2e2d
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class ListViewHighlighter implements OnScrollListener, RecyclerListener,
@Override @Override
public void onScroll(AbsListView view, int firstVisibleItem, public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) { int visibleItemCount, int totalItemCount) {
highlightIfVisible(firstVisibleItem, firstVisibleItem + visibleItemCount); highlightIfVisible(firstVisibleItem, firstVisibleItem + visibleItemCount - 1);
} }
private boolean highlightIfVisible(int start, int end) { private boolean highlightIfVisible(int start, int end) {