summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java')
-rw-r--r--java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
index 8928dd65e..fab5a07df 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
@@ -769,20 +769,30 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
rejectTextShow.setStartDelay(SWIPE_TO_DECLINE_FADE_IN_DELAY_MILLIS);
// reject hint text translate in
- Animator rejectTextTranslate =
+ Animator rejectTextTranslateIn =
ObjectAnimator.ofFloat(
swipeToRejectText,
View.TRANSLATION_Y,
DpUtil.dpToPx(getContext(), HINT_REJECT_FADE_TRANSLATION_Y_DP),
0f);
- rejectTextTranslate.setInterpolator(new FastOutSlowInInterpolator());
- rejectTextTranslate.setDuration(ANIMATE_DURATION_NORMAL_MILLIS);
+ rejectTextTranslateIn.setInterpolator(new FastOutSlowInInterpolator());
+ rejectTextTranslateIn.setDuration(ANIMATE_DURATION_NORMAL_MILLIS);
// reject hint text fade out
Animator rejectTextHide = ObjectAnimator.ofFloat(swipeToRejectText, View.ALPHA, 0f);
rejectTextHide.setInterpolator(new FastOutLinearInInterpolator());
rejectTextHide.setDuration(ANIMATE_DURATION_SHORT_MILLIS);
+ // reject hint text translate out
+ Animator rejectTextTranslateOut =
+ ObjectAnimator.ofFloat(
+ swipeToRejectText,
+ View.TRANSLATION_Y,
+ 0f,
+ DpUtil.dpToPx(getContext(), HINT_REJECT_FADE_TRANSLATION_Y_DP));
+ rejectTextTranslateOut.setInterpolator(new FastOutSlowInInterpolator());
+ rejectTextTranslateOut.setDuration(ANIMATE_DURATION_NORMAL_MILLIS);
+
Interpolator curve =
PathInterpolatorCompat.create(
0.4f /* controlX1 */, 0 /* controlY1 */, 0 /* controlX2 */, 1 /* controlY2 */);
@@ -817,6 +827,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
breatheAnimation
.play(textUp)
.with(rejectTextHide)
+ .with(rejectTextTranslateOut)
.with(puckUp)
.with(puckScaleUp)
.after(167 /* delay */);
@@ -827,7 +838,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
.with(textDown)
.with(puckScaleDown)
.with(rejectTextShow)
- .with(rejectTextTranslate)
+ .with(rejectTextTranslateIn)
.after(puckUp);
// Add vibration animation to the animator set.