diff options
author | Andrew Lee <anwlee@google.com> | 2014-04-24 17:47:46 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-04-24 17:51:57 -0700 |
commit | 43f80fa2bfa81f60d33c9cf855e7b7c8c0097946 (patch) | |
tree | 3dc7413f55dda120a27c6007cf7eda56e583b78d | |
parent | 24f0108f02430717ad1a0c73f5e66dc69c11fd88 (diff) |
Position InCall dialpad underneath end call button.
- Relocate the dialpad fragment into the primary call info layout.
- Tweak some constants, layout, and style properties.
Bug: 14108639
Change-Id: I91ef1b6c9a75e36066e5b2af36aa3ee5c7dfcdf8
-rw-r--r-- | InCallUI/res/layout/call_card.xml | 56 | ||||
-rw-r--r-- | InCallUI/res/layout/dialpad_incall.xml | 1 | ||||
-rw-r--r-- | InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml | 4 | ||||
-rw-r--r-- | InCallUI/res/layout/incall_screen.xml | 30 | ||||
-rw-r--r-- | InCallUI/res/values/dimens.xml | 10 |
5 files changed, 47 insertions, 54 deletions
diff --git a/InCallUI/res/layout/call_card.xml b/InCallUI/res/layout/call_card.xml index d56b7403c..87523106e 100644 --- a/InCallUI/res/layout/call_card.xml +++ b/InCallUI/res/layout/call_card.xml @@ -31,41 +31,57 @@ will expand to fill the full height of the CallCard. --> <!-- Primary "call card" block, for the foreground call. --> - <FrameLayout android:id="@+id/primary_call_info" + <FrameLayout android:layout_width="match_parent" android:layout_height="0dp" - android:layout_weight="1"> + android:layout_weight="5" > - <!-- Contact photo for primary call info --> - <ImageView android:id="@+id/photo" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" + <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="top|center_horizontal" - android:scaleType="centerCrop" - android:contentDescription="@string/contactPhoto" - android:src="@drawable/picture_unknown"/> + android:orientation="vertical" > - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" > + + <include android:id="@+id/primary_call_info" + layout="@layout/primary_call_info" /> + + <fragment android:name="com.android.incallui.CallButtonFragment" + android:id="@+id/callButtonFragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> - <include android:id="@+id/primary_call_info" - layout="@layout/primary_call_info" /> + </LinearLayout> - <fragment android:name="com.android.incallui.CallButtonFragment" - android:id="@+id/callButtonFragment" + <FrameLayout android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="match_parent" > + + <!-- Contact photo for primary call info --> + <ImageView android:id="@+id/photo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="top|center_horizontal" + android:scaleType="centerCrop" + android:contentDescription="@string/contactPhoto" + android:src="@drawable/picture_unknown"/> + + <fragment android:name="com.android.incallui.DialpadFragment" + android:id="@+id/dialpadFragment" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + </FrameLayout> </LinearLayout> <FrameLayout android:layout_width="@dimen/floating_action_button_width" android:layout_height="@dimen/floating_action_button_height" - android:layout_marginBottom="@dimen/end_call_button_margin_bottom" + android:layout_marginBottom="@dimen/floating_action_button_margin_bottom" android:layout_gravity="bottom|center"> <ImageButton android:id="@+id/endButton" diff --git a/InCallUI/res/layout/dialpad_incall.xml b/InCallUI/res/layout/dialpad_incall.xml index d9473c1c6..a5ebb825b 100644 --- a/InCallUI/res/layout/dialpad_incall.xml +++ b/InCallUI/res/layout/dialpad_incall.xml @@ -21,6 +21,7 @@ android:layout_height="0dp" android:layout_weight="4" android:layout_gravity="center_horizontal" + android:paddingBottom="@dimen/dialpad_bottom_padding" android:paddingLeft="@dimen/dialpad_horizontal_padding" android:paddingRight="@dimen/dialpad_horizontal_padding" android:background="@color/background_dialpad" diff --git a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml index d921ca34a..6bae39381 100644 --- a/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml +++ b/InCallUI/res/layout/dtmf_twelve_key_dialer_view.xml @@ -44,8 +44,8 @@ android:layout_marginBottom="5dp" android:layout_marginStart="32dp" android:layout_marginEnd="32dp" - android:paddingEnd="16dp" - android:paddingStart="16dp" + android:paddingEnd="12dp" + android:paddingStart="12dp" android:singleLine="true" android:scrollHorizontally="true" android:gravity="center" diff --git a/InCallUI/res/layout/incall_screen.xml b/InCallUI/res/layout/incall_screen.xml index d00b6bb95..45bf37a11 100644 --- a/InCallUI/res/layout/incall_screen.xml +++ b/InCallUI/res/layout/incall_screen.xml @@ -20,35 +20,13 @@ android:layout_height="match_parent" android:id="@+id/main" > - <LinearLayout android:id="@+id/in_call_and_button_container" + <fragment android:name="com.android.incallui.CallCardFragment" + android:id="@+id/callCardFragment" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" > - - <LinearLayout android:id="@+id/in_call_card_container" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:orientation="vertical" > - - <fragment android:name="com.android.incallui.CallCardFragment" - android:id="@+id/callCardFragment" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" - android:layout_weight="1"/> - - <fragment android:name="com.android.incallui.DialpadFragment" - android:id="@+id/dialpadFragment" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_alignParentTop="true" - android:layout_alignParentStart="true" - android:layout_weight="1" /> - </LinearLayout> + android:layout_alignParentTop="true" + android:layout_alignParentStart="true" /> - </LinearLayout> <fragment android:name="com.android.incallui.AnswerFragment" android:id="@+id/answerFragment" diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml index 17dc87253..e9dd26bc9 100644 --- a/InCallUI/res/values/dimens.xml +++ b/InCallUI/res/values/dimens.xml @@ -20,7 +20,7 @@ <!-- Height of the "call banner" overlay on top of the upper part of the call info area. --> - <dimen name="call_banner_height">80dp</dimen> + <dimen name="call_banner_height">75dp</dimen> <!-- Margin between the bottom of the "call card" photo and the top of the in-call button cluster. --> @@ -31,8 +31,8 @@ <!-- Padding at the right edges of the secondary call banner. --> <dimen name="secondary_call_banner_right_padding">100dp</dimen> <!-- Padding at the top and bottom edges of the "call banner". --> - <dimen name="call_banner_primary_call_top_padding">32dp</dimen> - <dimen name="call_banner_top_bottom_padding">16dp</dimen> + <dimen name="call_banner_primary_call_top_padding">24dp</dimen> + <dimen name="call_banner_top_bottom_padding">8dp</dimen> <!-- Padding at the top and bottom edges of the "provider information" --> <dimen name="provider_info_top_bottom_padding">8dp</dimen> @@ -56,9 +56,6 @@ <!-- Height of buttons in the extra button row. --> <dimen name="extra_row_button_height">@dimen/in_call_button_height</dimen> - <!-- Bottom margin for the end call button. --> - <dimen name="end_call_button_margin_bottom">30dp</dimen> - <!-- Padding at the left and right edges of the incall_touch_ui button cluster. This padding is necessary because we can't allow the buttons to be very close to the edges of the screen, due to the @@ -133,6 +130,7 @@ <dimen name="dialpad_key_height">56dp</dimen> <dimen name="dialpad_key_plus_size">18sp</dimen> <dimen name="dialpad_number_to_letters_padding">11dp</dimen> + <dimen name="dialpad_bottom_padding">90dp</dimen> <dimen name="dialpad_horizontal_padding">5dp</dimen> <!-- Height of translucent shadow effect --> |