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

Commit 549d2b15 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3501411 - ListView should ignore "up" events outside of its view"

parents e0d23e6f 498e43dd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3018,7 +3018,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            case TOUCH_MODE_DONE_WAITING:
                final int motionPosition = mMotionPosition;
                final View child = getChildAt(motionPosition - mFirstPosition);
                if (child != null && !child.hasFocusable()) {

                final float x = ev.getX();
                final boolean inList = x > mListPadding.left && x < getWidth() - mListPadding.right;

                if (child != null && !child.hasFocusable() && inList) {
                    if (mTouchMode != TOUCH_MODE_DOWN) {
                        child.setPressed(false);
                    }