From c44f654b992c6ab8a4acff9cb5aa2678c58755d9 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 18 Aug 2014 12:56:36 -0700 Subject: Move hold "bar" to the bottom of the screen. + Adjust FAB positioning scenarios; scale in and out instead of translating when showing/hiding. + Translate FAB depending on whether secondary call info is shown. Bug: 16399233 Bug: 15862303 Change-Id: Ibbf89f717a38f2ed6d4d995544e290da4d4d7462 --- InCallUI/res/layout/call_card_content.xml | 12 +-- .../res/layout/dtmf_twelve_key_dialer_view.xml | 3 +- InCallUI/res/layout/secondary_call_info.xml | 1 + InCallUI/res/values/dimens.xml | 1 - .../src/com/android/incallui/CallCardFragment.java | 106 ++++++++++++++------- .../com/android/incallui/CallCardPresenter.java | 6 +- .../src/com/android/incallui/InCallActivity.java | 4 +- 7 files changed, 85 insertions(+), 48 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/res/layout/call_card_content.xml b/InCallUI/res/layout/call_card_content.xml index 5437ef04d..605d6300f 100644 --- a/InCallUI/res/layout/call_card_content.xml +++ b/InCallUI/res/layout/call_card_content.xml @@ -18,7 +18,7 @@ + android:layout_height="match_parent"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true"/> + android:orientation="vertical"> 2dp 8dp - 80dp 50dp diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index d79330e4b..8ca1dd67c 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -61,6 +61,7 @@ public class CallCardFragment extends BaseFragment final boolean enableEndCallButton = Call.State.isConnectingOrConnected(callState) && callState != Call.State.INCOMING && mPrimary != null; - getUi().setEndCallButtonEnabled(enableEndCallButton); + // Hide the end call button instantly if we're receiving an incoming call. + getUi().setEndCallButtonEnabled( + enableEndCallButton, callState != Call.State.INCOMING /* animate */); } @Override @@ -653,7 +655,7 @@ public class CallCardPresenter extends Presenter void setPrimaryImage(Drawable image); void setPrimaryPhoneNumber(String phoneNumber); void setPrimaryLabel(String label); - void setEndCallButtonEnabled(boolean enabled); + void setEndCallButtonEnabled(boolean enabled, boolean animate); void setCallbackNumber(String number, boolean isEmergencyCalls); void setPhotoVisible(boolean isVisible); void setProgressSpinnerVisible(boolean visible); diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 8930837dc..cbb2af280 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -568,10 +568,8 @@ public class InCallActivity extends Activity { if (showDialpad) { showDialpad(true); mDialpadFragment.animateShowDialpad(); - mCallCardFragment.onDialpadShow(); - } else { - mCallCardFragment.onDialpadHide(); } + mCallCardFragment.onDialpadVisiblityChange(showDialpad); mDialpadFragment.getView().startAnimation(showDialpad ? mSlideIn : mSlideOut); } -- cgit v1.2.3