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

Commit 27cba164 authored by Aaron Liu's avatar Aaron Liu Committed by Automerger Merge Worker
Browse files

Merge "Bouncer: Add interpolators on push animations." into tm-dev am: dcff8df6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17108231

Change-Id: I2cd85e0a62584230f846a8e512a2337ad1d06c5a
parents 56c39376 dcff8df6
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -73,12 +73,14 @@ class NumPadAnimator {
        ValueAnimator expandBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(),
        ValueAnimator expandBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(),
                mNormalColor, mHighlightColor);
                mNormalColor, mHighlightColor);
        expandBackgroundColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS);
        expandBackgroundColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS);
        expandBackgroundColorAnimator.setInterpolator(Interpolators.LINEAR);
        expandBackgroundColorAnimator.addUpdateListener(
        expandBackgroundColorAnimator.addUpdateListener(
                animator -> mBackground.setColor((int) animator.getAnimatedValue()));
                animator -> mBackground.setColor((int) animator.getAnimatedValue()));


        ValueAnimator expandTextColorAnimator =
        ValueAnimator expandTextColorAnimator =
                ValueAnimator.ofObject(new ArgbEvaluator(),
                ValueAnimator.ofObject(new ArgbEvaluator(),
                textColorPrimary, textColorPrimaryInverse);
                textColorPrimary, textColorPrimaryInverse);
        expandTextColorAnimator.setInterpolator(Interpolators.LINEAR);
        expandTextColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS);
        expandTextColorAnimator.setDuration(EXPAND_COLOR_ANIMATION_MS);
        expandTextColorAnimator.addUpdateListener(valueAnimator -> {
        expandTextColorAnimator.addUpdateListener(valueAnimator -> {
            if (digitTextView != null) {
            if (digitTextView != null) {
@@ -98,6 +100,7 @@ class NumPadAnimator {
                anim -> mBackground.setCornerRadius((float) anim.getAnimatedValue()));
                anim -> mBackground.setCornerRadius((float) anim.getAnimatedValue()));
        ValueAnimator contractBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(),
        ValueAnimator contractBackgroundColorAnimator = ValueAnimator.ofObject(new ArgbEvaluator(),
                mHighlightColor, mNormalColor);
                mHighlightColor, mNormalColor);
        contractBackgroundColorAnimator.setInterpolator(Interpolators.LINEAR);
        contractBackgroundColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS);
        contractBackgroundColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS);
        contractBackgroundColorAnimator.setDuration(CONTRACT_ANIMATION_MS);
        contractBackgroundColorAnimator.setDuration(CONTRACT_ANIMATION_MS);
        contractBackgroundColorAnimator.addUpdateListener(
        contractBackgroundColorAnimator.addUpdateListener(
@@ -106,6 +109,7 @@ class NumPadAnimator {
        ValueAnimator contractTextColorAnimator =
        ValueAnimator contractTextColorAnimator =
                ValueAnimator.ofObject(new ArgbEvaluator(), textColorPrimaryInverse,
                ValueAnimator.ofObject(new ArgbEvaluator(), textColorPrimaryInverse,
                textColorPrimary);
                textColorPrimary);
        contractTextColorAnimator.setInterpolator(Interpolators.LINEAR);
        contractTextColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS);
        contractTextColorAnimator.setStartDelay(CONTRACT_ANIMATION_DELAY_MS);
        contractTextColorAnimator.setDuration(CONTRACT_ANIMATION_MS);
        contractTextColorAnimator.setDuration(CONTRACT_ANIMATION_MS);
        contractTextColorAnimator.addUpdateListener(valueAnimator -> {
        contractTextColorAnimator.addUpdateListener(valueAnimator -> {