Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
teach committed May 18, 2021
1 parent 8525203 commit 6e489e4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2159,10 +2159,9 @@ public void smoothScrollToChildWithOffset(View view, int offset) {
*/
private int getViewsScrollOffset(int index) {
int offset = 0;
List<View> children = getNonGoneChildren();
int count = children.size();
int count = getChildCount();
for (int i = index; i < count; i++) {
View child = children.get(i);
View child = getChildAt(i);
if (child.getVisibility() != GONE && ScrollUtils.isConsecutiveScrollerChild(child)) {
offset += ScrollUtils.computeVerticalScrollOffset(child);
}
Expand Down

0 comments on commit 6e489e4

Please sign in to comment.