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

Commit a1113284 authored by Alan Viverette's avatar Alan Viverette
Browse files

Don't auto scroll empty lists

BUG: 12930741
Change-Id: I22bcebace0d5e0d519d38b34d6312ffff5b62f9b
parent 118d1134
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;