diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-08 22:14:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-08 22:14:32 +0000 |
commit | e7e294d880c8cdda8ddec98624f1a986af5d9ee0 (patch) | |
tree | 3c241d574299916b1bd79790a5878e63df0b3065 /InCallUI | |
parent | 811ce433e517ed5cf4fd0932f2bac619a07cfc12 (diff) | |
parent | 8f348100eff76cbfc2d38a59e028387f7cb0e21b (diff) |
Merge "Fix animation for call state label" into lmp-dev
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 9 |
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); } |