From 7e9763e4b3806c9edaf3df4f59a3d5a6452a361c Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 26 Mar 2015 16:33:15 -0700 Subject: Fix some jank during shrink animation * Prevent call updates while animation is running * Create hardware layers for animating views before animation starts. Alpha animations on the text elements require a hardware layer to be built beforehand. Do this before the animation starts instead of after the first frame is drawn. Change-Id: I21a8a9096f36adc4688597f7469a2f05a1b5234c --- .../src/com/android/incallui/CallCardFragment.java | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'InCallUI/src/com/android/incallui/CallCardFragment.java') diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 5f5146e19..56c099053 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -21,6 +21,8 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.LayoutTransition; import android.animation.ObjectAnimator; +import android.animation.ValueAnimator; +import android.animation.ValueAnimator.AnimatorUpdateListener; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; @@ -110,6 +112,8 @@ public class CallCardFragment extends BaseFragment