From afedca374ff6e13291fa681a71a1799e2d205a05 Mon Sep 17 00:00:00 2001 From: Sai Cheemalapati Date: Wed, 4 Jun 2014 16:36:29 -0700 Subject: Moving FAB logic to ContactsCommon. Moved FAB to ContactsCommon. Cleaned up FAB Controller. Replaced implementation of FAB in InCallUI with controller. Prevented animations from happening again in InCallUI on orientaton change. FAB also repositions correctly on orientation change in InCallUI. Bug: 15386162 Change-Id: I8ea4ef8acb49a83dabe5c18223ce5bac28260824 --- .../src/com/android/incallui/CallCardFragment.java | 77 ++++++++++++++++++---- .../src/com/android/incallui/InCallActivity.java | 1 + 2 files changed, 65 insertions(+), 13 deletions(-) (limited to 'InCallUI/src/com') diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 5adb0521e..3be517b39 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -23,6 +23,7 @@ import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.app.Activity; import android.content.Context; +import android.content.res.Configuration; import android.graphics.Point; import android.graphics.drawable.Drawable; import android.os.Bundle; @@ -44,6 +45,7 @@ import android.widget.TextView; import com.android.contacts.common.animation.AnimUtils; import com.android.contacts.common.util.ViewUtil; +import com.android.contacts.common.widget.FloatingActionButtonController; import java.util.List; @@ -53,8 +55,9 @@ import java.util.List; public class CallCardFragment extends BaseFragment implements CallCardPresenter.CallCardUi { - private static final int REVEAL_ANIMATION_DURATION = 333; - private static final int SHRINK_ANIMATION_DURATION = 333; + private int mRevealAnimationDuration; + private int mShrinkAnimationDuration; + private boolean mIsLandscape; // Primary caller info private TextView mPhoneNumber; @@ -76,8 +79,10 @@ public class CallCardFragment extends BaseFragment