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

Commit 2949a41a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use fling animation utils for snapChild"

parents 35047419 8bdeca00
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -474,8 +474,6 @@ public class SwipeHelper implements Gefingerpoken {
        if (anim == null) {
            return;
        }
        int duration = SNAP_ANIM_LEN;
        anim.setDuration(duration);
        anim.addListener(new AnimatorListenerAdapter() {
            boolean wasCancelled = false;

@@ -495,6 +493,9 @@ public class SwipeHelper implements Gefingerpoken {
        });
        prepareSnapBackAnimation(animView, anim);
        mSnappingChild = true;
        float maxDistance = Math.abs(targetLeft - getTranslation(animView));
        mFlingAnimationUtils.apply(anim, getTranslation(animView), targetLeft, velocity,
                maxDistance);
        anim.start();
    }