summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-09-08 22:14:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-08 22:14:32 +0000
commite7e294d880c8cdda8ddec98624f1a986af5d9ee0 (patch)
tree3c241d574299916b1bd79790a5878e63df0b3065
parent811ce433e517ed5cf4fd0932f2bac619a07cfc12 (diff)
parent8f348100eff76cbfc2d38a59e028387f7cb0e21b (diff)
Merge "Fix animation for call state label" into lmp-dev
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 3dc8ba747..97949097a 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -19,6 +19,7 @@ package com.android.incallui;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
+import android.animation.LayoutTransition;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Context;
@@ -81,7 +82,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
// Container view that houses the entire primary call card, including the call buttons
private View mPrimaryCallCardContainer;
// Container view that houses the primary call information
- private View mPrimaryCallInfo;
+ private ViewGroup mPrimaryCallInfo;
private View mCallButtonsContainer;
// Secondary caller info
@@ -180,7 +181,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mCallTypeLabel = (TextView) view.findViewById(R.id.callTypeLabel);
mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime);
mPrimaryCallCardContainer = view.findViewById(R.id.primary_call_info_container);
- mPrimaryCallInfo = view.findViewById(R.id.primary_call_banner);
+ mPrimaryCallInfo = (ViewGroup) view.findViewById(R.id.primary_call_banner);
mCallButtonsContainer = view.findViewById(R.id.callButtonFragment);
mInCallMessageLabel = (TextView) view.findViewById(R.id.connectionServiceMessage);
mProgressSpinner = view.findViewById(R.id.progressSpinner);
@@ -893,6 +894,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
final Point startPoint = touchPoint;
final ViewTreeObserver observer = getView().getViewTreeObserver();
+
+ mPrimaryCallInfo.getLayoutTransition().disableTransitionType(LayoutTransition.CHANGING);
+
observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
@@ -1060,6 +1064,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
setViewStatePostAnimation(mCallStateIcon);
mPrimaryCallCardContainer.removeOnLayoutChangeListener(layoutChangeListener);
+ mPrimaryCallInfo.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
mFloatingActionButtonController.scaleIn(AnimUtils.NO_DELAY);
}