diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-08 14:36:26 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-09-08 14:49:46 -0700 |
commit | 8f348100eff76cbfc2d38a59e028387f7cb0e21b (patch) | |
tree | c18c3785d1a5cddebe2d7808438ed8ce5314aab6 /InCallUI | |
parent | 9e5e89db136a2b35aeaaf4da47fc2b8b1b47d2ff (diff) |
Fix animation for call state label
Enable the CHANGING layout transition, when the shrink animator isn't
running.
Bug: 17411260
Change-Id: Iabc30657fc636ee44e3c9842cc2b8f53a0b504e7
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); } |