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

Commit 49551ca4 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 9a559970: am f67c874c: am 7e5e3745: Fix bug 2710825 - Prevent...

am 9a559970: am f67c874c: am 7e5e3745: Fix bug 2710825 - Prevent ExpandableListView from scrolling too far when expanding children.
parents a5437f2d 9a559970
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -2645,7 +2645,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                        mScrollDuration);
                        mScrollDuration);


                mLastSeenPos = lastPos;
                mLastSeenPos = lastPos;
                if (lastPos != mTargetPos) {
                if (lastPos < mTargetPos) {
                    post(this);
                    post(this);
                }
                }
                break;
                break;
@@ -2671,7 +2671,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                final int nextViewHeight = nextView.getHeight();
                final int nextViewHeight = nextView.getHeight();
                final int nextViewTop = nextView.getTop();
                final int nextViewTop = nextView.getTop();
                final int extraScroll = mExtraScroll;
                final int extraScroll = mExtraScroll;
                if (nextPos != mBoundPos) {
                if (nextPos < mBoundPos) {
                    smoothScrollBy(Math.max(0, nextViewHeight + nextViewTop - extraScroll),
                    smoothScrollBy(Math.max(0, nextViewHeight + nextViewTop - extraScroll),
                            mScrollDuration);
                            mScrollDuration);


@@ -2704,7 +2704,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te


                mLastSeenPos = firstPos;
                mLastSeenPos = firstPos;


                if (firstPos != mTargetPos) {
                if (firstPos > mTargetPos) {
                    post(this);
                    post(this);
                }
                }
                break;
                break;
@@ -2728,7 +2728,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                final int lastViewTop = lastView.getTop();
                final int lastViewTop = lastView.getTop();
                final int lastViewPixelsShowing = listHeight - lastViewTop;
                final int lastViewPixelsShowing = listHeight - lastViewTop;
                mLastSeenPos = lastPos;
                mLastSeenPos = lastPos;
                if (lastPos != mBoundPos) {
                if (lastPos > mBoundPos) {
                    smoothScrollBy(-(lastViewPixelsShowing - mExtraScroll), mScrollDuration);
                    smoothScrollBy(-(lastViewPixelsShowing - mExtraScroll), mScrollDuration);
                    post(this);
                    post(this);
                } else {
                } else {