diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:23:13 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:23:13 +0000 |
commit | 300a8683b9c28424fb0f0c571a0abe128c461f69 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/incallui/answer/impl/hint/PawAnswerHint.java | |
parent | d67f1627521b174f12e0c247f154c7c93c5e408e (diff) | |
parent | 10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (diff) |
Update Dialer to V10 RC16
am: 10b34a5ebf
Change-Id: Iea3e96ccdeaf1fa796ceca702cace82ca20f298c
Diffstat (limited to 'java/com/android/incallui/answer/impl/hint/PawAnswerHint.java')
-rw-r--r-- | java/com/android/incallui/answer/impl/hint/PawAnswerHint.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/com/android/incallui/answer/impl/hint/PawAnswerHint.java b/java/com/android/incallui/answer/impl/hint/PawAnswerHint.java index 36b761f57..079f325f7 100644 --- a/java/com/android/incallui/answer/impl/hint/PawAnswerHint.java +++ b/java/com/android/incallui/answer/impl/hint/PawAnswerHint.java @@ -92,9 +92,10 @@ public final class PawAnswerHint implements AnswerHint { @Override public void onBounceStart() { if (answerGestureHintAnim == null) { - answerGestureHintAnim = new AnimatorSet(); - answerHintContainer.setY(puck.getY() + getDimension(R.dimen.hint_initial_offset)); + int[] puckLocation = new int[2]; + puck.getLocationInWindow(puckLocation); + answerHintContainer.setY(puckLocation[1] + getDimension(R.dimen.hint_initial_offset)); Animator fadeIn = createFadeIn(); @@ -102,7 +103,7 @@ public final class PawAnswerHint implements AnswerHint { ObjectAnimator.ofFloat( answerHintContainer, View.TRANSLATION_Y, - puck.getY() - getDimension(R.dimen.hint_offset)); + puckLocation[1] - getDimension(R.dimen.hint_offset)); swipeUp.setInterpolator(new FastOutSlowInInterpolator()); swipeUp.setDuration(SWIPE_UP_DURATION_ALPHA_MILLIS); @@ -124,7 +125,7 @@ public final class PawAnswerHint implements AnswerHint { payloadView.setAlpha(0); payloadView.setScaleX(1); payloadView.setScaleY(1); - answerHintContainer.setY(puck.getY() + getDimension(R.dimen.hint_initial_offset)); + answerHintContainer.setY(puckLocation[1] + getDimension(R.dimen.hint_initial_offset)); answerHintContainer.setVisibility(View.VISIBLE); } }); |