Merge "Bouncer: Add interpolators on push animations." into tm-dev
This commit is contained in:
@@ -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 -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user