Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14b51940 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Constrain starting sub row to list bounds"

parents c900829c 2546fcf5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7188,7 +7188,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                startOffsetRatio = -firstChild.getTop() / (float) firstChildHeight;
            }

            final float startSubRow = firstRow + startOffsetRatio;
            final float startSubRow = MathUtils.constrain(
                    firstRow + startOffsetRatio, 0, getCount());
            if (startSubRow == endSubRow && mOffset == 0) {
                // Don't scroll, target is already in position.
                return;