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

Commit 5121caf3 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Properly clear animations after dragging

Test: manual, drag and release fast
Fixes: 176699404
Bug: 188640649
Change-Id: I1569c4d69622e9803be9524cb1ed2225d712a3b3
parent 7712f3bc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -567,6 +567,8 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta

        public void clearDrag() {
            itemView.clearAnimation();
            itemView.setScaleX(1);
            itemView.setScaleY(1);
        }

        public void startDrag() {
@@ -812,5 +814,12 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
        @Override
        public void onSwiped(ViewHolder viewHolder, int direction) {
        }

        // Just in case, make sure to animate to base state.
        @Override
        public void clearView(@NonNull RecyclerView recyclerView, @NonNull ViewHolder viewHolder) {
            ((Holder) viewHolder).stopDrag();
            super.clearView(recyclerView, viewHolder);
        }
    };
}