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

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

Merge "Don't auto scroll empty lists"

parents 6fd0ef7f a1113284
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -892,6 +892,10 @@ public abstract class AutoScrollHelper implements View.OnTouchListener {
        public boolean canTargetScrollVertically(int direction) {
            final AbsListView target = mTarget;
            final int itemCount = target.getCount();
            if (itemCount == 0) {
                return false;
            }

            final int childCount = target.getChildCount();
            final int firstPosition = target.getFirstVisiblePosition();
            final int lastPosition = firstPosition + childCount;