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

Commit 1d6394b5 authored by Yorke Lee's avatar Yorke Lee
Browse files

Prevent swiped view from being recycled

Bug: 10257340

Change-Id: I5864a93e2ee64048fb6309c2ca2870cfea58fcce
parent 660cc3b8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -151,10 +151,14 @@ public class SwipeableListView extends ListView implements SwipeHelperCallback {
    }

    @Override
    public void onDragCancelled(View v) {}
    public void onDragCancelled(View v) {
        v.setHasTransientState(false);
    }

    @Override
    public void onBeginDrag(View v) {
        final View tileRow = (View) v.getParent();
        tileRow.setHasTransientState(true);
        // We do this so the underlying ScrollView knows that it won't get
        // the chance to intercept events anymore
        requestDisallowInterceptTouchEvent(true);