summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/CallCardFragment.java
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-06-06 18:32:53 -0700
committerSai Cheemalapati <saicheems@google.com>2014-06-09 14:59:11 -0700
commit452823e36677a4a0f0083497b67c9d5359d72a34 (patch)
treedbb9be3159d1362aeaaa674db9e366c37eb8203a /InCallUI/src/com/android/incallui/CallCardFragment.java
parentafedca374ff6e13291fa681a71a1799e2d205a05 (diff)
Updating Dialpad animation in InCallUI.
Dialpad now saves orientation state. Animation now matches duration and direction in Dialtacts. Bug: 15386162 Change-Id: I6b8f23147c9be956d16c758a6a51a9fa3bb47ec6
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallCardFragment.java')
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java38
1 files changed, 18 insertions, 20 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 3be517b39..7cd8c90aa 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -168,27 +168,25 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
R.dimen.floating_action_button_width);
mFloatingActionButtonController = new FloatingActionButtonController(getActivity(),
mFloatingActionButtonContainer);
- if (savedInstanceState != null) {
- final ViewGroup parent = (ViewGroup) mPrimaryCallCardContainer.getParent();
- final ViewTreeObserver observer = getView().getViewTreeObserver();
- observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
- @Override
- public void onGlobalLayout() {
- final ViewTreeObserver observer = getView().getViewTreeObserver();
- if (!observer.isAlive()) {
- return;
- }
- observer.removeOnGlobalLayoutListener(this);
- mFloatingActionButtonController.setScreenWidth(parent.getWidth());
- mFloatingActionButtonController.align(
- mIsLandscape ? FloatingActionButtonController.ALIGN_QUARTER_RIGHT
- : FloatingActionButtonController.ALIGN_MIDDLE,
- 0 /* offsetX */,
- 0 /* offsetY */,
- false);
+ final ViewGroup parent = (ViewGroup) mPrimaryCallCardContainer.getParent();
+ final ViewTreeObserver observer = getView().getViewTreeObserver();
+ observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ final ViewTreeObserver observer = getView().getViewTreeObserver();
+ if (!observer.isAlive()) {
+ return;
}
- });
- }
+ observer.removeOnGlobalLayoutListener(this);
+ mFloatingActionButtonController.setScreenWidth(parent.getWidth());
+ mFloatingActionButtonController.align(
+ mIsLandscape ? FloatingActionButtonController.ALIGN_QUARTER_RIGHT
+ : FloatingActionButtonController.ALIGN_MIDDLE,
+ 0 /* offsetX */,
+ 0 /* offsetY */,
+ false);
+ }
+ });
mHandoffButton = (ImageButton) view.findViewById(R.id.handoffButton);
mHandoffButton.setOnClickListener(new View.OnClickListener() {