diff options
author | Nancy Chen <nancychen@google.com> | 2016-02-11 13:35:07 -0800 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2016-02-12 19:21:51 +0000 |
commit | c1d526ca6742a59b099d307ce7c64b36366f47d3 (patch) | |
tree | 978b3248e6297d0580e38da45d3b49cd0680648a /InCallUI/res | |
parent | 679c717fca664c0703e9ea3a58239d30f1cadea1 (diff) |
[DO NOT MERGE] Adjust multi-window UI for InCallUI <100% modes.
This CL is a direct copy from ag/864936. The original CL missed the move
from InCallUI to Dialer/InCallUI.
Origianl description:
Multi-window mode reduces the available screen real estate for the
InCallUI. As a result, some changes need to be made so important
information is still shown. When the UI has <100% of its normal screen
real estate:
* Remove large photo
* Shift hangup button down
the way the resource files should be interpreted:
* The base layout/ is the default layout, in this case, it is the
multi-window layout
* layout-h600hdp is the layout used when the screen height is >=600 dp,
which is the layout in 100% screen size (this is a direct copy of the
old layout/ file(s)
* layout-w600dp-land is the layout used when the device is in landscape
mode with a width >=600 dp (this is a direct renaming from *-land/)
Bug:26253432
Change-Id: I3db194a1e5b3334d10ab76806644b1a0769ad777
(cherry picked from commit fc1929393b506e7f7665be49424336ac2b7a02ae)
Diffstat (limited to 'InCallUI/res')
-rw-r--r-- | InCallUI/res/layout-h600dp/call_card_fragment.xml | 173 | ||||
-rw-r--r-- | InCallUI/res/layout-w600dp-land/call_card_fragment.xml (renamed from InCallUI/res/layout-land/call_card_fragment.xml) | 0 | ||||
-rw-r--r-- | InCallUI/res/layout/call_card_fragment.xml | 266 | ||||
-rw-r--r-- | InCallUI/res/layout/primary_call_info.xml | 333 | ||||
-rw-r--r-- | InCallUI/res/values-h600dp/dimens.xml | 24 | ||||
-rw-r--r-- | InCallUI/res/values-w600dp-land/colors.xml (renamed from InCallUI/res/values-land/colors.xml) | 0 | ||||
-rw-r--r-- | InCallUI/res/values-w600dp-land/dimens.xml (renamed from InCallUI/res/values-land/dimens.xml) | 0 | ||||
-rw-r--r-- | InCallUI/res/values/dimens.xml | 8 |
8 files changed, 491 insertions, 313 deletions
diff --git a/InCallUI/res/layout-h600dp/call_card_fragment.xml b/InCallUI/res/layout-h600dp/call_card_fragment.xml new file mode 100644 index 000000000..c3ae877e7 --- /dev/null +++ b/InCallUI/res/layout-h600dp/call_card_fragment.xml @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + ~ Copyright (C) 2016 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <!-- Primary "call card" block, for the foreground call. --> + <LinearLayout + android:id="@+id/primary_call_info_container" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="vertical" + android:elevation="@dimen/primary_call_elevation" + android:background="@color/incall_call_banner_background_color" + android:paddingTop="@dimen/call_banner_primary_call_container_top_padding" + android:clipChildren="false" + android:clipToPadding="false" + android:gravity="bottom"> + + <include layout="@layout/primary_call_info" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:minHeight="@dimen/call_banner_height" + android:animateLayoutChanges="true" + android:gravity="center" + android:layout_centerHorizontal="true" /> + + <fragment android:name="com.android.incallui.CallButtonFragment" + android:id="@+id/callButtonFragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + <TextView android:id="@+id/connectionServiceMessage" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceMedium" + android:visibility="gone" + android:padding="@dimen/call_banner_side_padding" + android:background="@android:color/white" /> + + </LinearLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="2"> + + <FrameLayout + android:layout_height="match_parent" + android:layout_width="match_parent" + android:id="@+id/call_card_content"> + + <!-- Contact photo for primary call info --> + <ImageView android:id="@+id/photoLarge" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="centerCrop" + android:importantForAccessibility="no" + android:background="@color/incall_photo_background_color" + android:src="@drawable/img_no_image_automirrored" /> + + <!-- Call context --> + <LinearLayout + android:id="@+id/contact_context" + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:background="@color/incall_background_color" + android:visibility="gone"> + <TextView android:id="@+id/contactContextTitle" + android:textSize="@dimen/contact_context_title_text_size" + android:textColor="@color/contact_context_title_text_color" + android:fontFamily="sans-serif-medium" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="@dimen/contact_context_title_margin_bottom"/> + <ListView android:id="@+id/contactContextInfo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:divider="@null" + android:dividerHeight="@dimen/contact_context_list_item_padding"/> + </LinearLayout> + </FrameLayout> + + <fragment android:name="com.android.incallui.VideoCallFragment" + android:id="@+id/videoCallFragment" + android:layout_alignParentTop="true" + android:layout_gravity="top|center_horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. --> + <FrameLayout + android:id="@+id/progressSpinner" + android:background="#63000000" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:visibility="gone"> + + <ProgressBar + android:id="@+id/progress_bar" + style="@android:style/Widget.Material.ProgressBar" + android:layout_gravity="center" + android:layout_width="48dp" + android:layout_height="48dp" + android:indeterminate="true" /> + + </FrameLayout> + + + <include layout="@layout/manage_conference_call_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + <!-- Placeholder for various fragments that are added dynamically underneath the caller info. --> + <FrameLayout + android:id="@+id/answer_and_dialpad_container" + android:layout_gravity="bottom|center_horizontal" + android:layout_alignParentBottom="true" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:elevation="@dimen/dialpad_elevation" /> + + <FrameLayout + android:id="@+id/floating_end_call_action_button_container" + android:layout_width="@dimen/end_call_floating_action_button_diameter" + android:layout_height="@dimen/end_call_floating_action_button_diameter" + android:background="@drawable/fab_red" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:layout_marginBottom="@dimen/end_call_button_margin_bottom"> + + <ImageButton android:id="@+id/floating_end_call_action_button" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/end_call_background" + android:src="@drawable/fab_ic_end_call" + android:scaleType="center" + android:contentDescription="@string/onscreenEndCallText" /> + + </FrameLayout> + + </RelativeLayout> + + </LinearLayout> + <!-- Secondary "Call info" block, for the background ("on hold") call. --> + <include layout="@layout/secondary_call_info" /> +</RelativeLayout>
\ No newline at end of file diff --git a/InCallUI/res/layout-land/call_card_fragment.xml b/InCallUI/res/layout-w600dp-land/call_card_fragment.xml index c71cf07a6..c71cf07a6 100644 --- a/InCallUI/res/layout-land/call_card_fragment.xml +++ b/InCallUI/res/layout-w600dp-land/call_card_fragment.xml diff --git a/InCallUI/res/layout/call_card_fragment.xml b/InCallUI/res/layout/call_card_fragment.xml index 760e4e261..09e148512 100644 --- a/InCallUI/res/layout/call_card_fragment.xml +++ b/InCallUI/res/layout/call_card_fragment.xml @@ -17,151 +17,141 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_width="match_parent" + android:layout_height="match_parent"> + <LinearLayout + android:id="@+id/primary_call_info_container" + android:layout_centerVertical="true" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + android:elevation="@dimen/primary_call_elevation" + android:background="@color/incall_call_banner_background_color" + android:clipChildren="false" + android:clipToPadding="false" + android:alpha="0.9"> + + <include layout="@layout/primary_call_info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/call_banner_vertical_margin" + android:layout_marginBottom="@dimen/call_banner_vertical_margin"/> + + <fragment android:name="com.android.incallui.CallButtonFragment" + android:id="@+id/callButtonFragment" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" /> + + <!-- Secondary "Call info" block, for the background ("on hold") call. --> + <include layout="@layout/secondary_call_info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="bottom" /> - <!-- Primary "call card" block, for the foreground call. --> - <LinearLayout - android:id="@+id/primary_call_info_container" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:orientation="vertical" - android:elevation="@dimen/primary_call_elevation" - android:background="@color/incall_call_banner_background_color" - android:paddingTop="@dimen/call_banner_primary_call_container_top_padding" - android:clipChildren="false" - android:clipToPadding="false" - android:gravity="bottom"> - - <include layout="@layout/primary_call_info" - android:layout_centerHorizontal="true" /> - - <fragment android:name="com.android.incallui.CallButtonFragment" - android:id="@+id/callButtonFragment" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> - - <TextView android:id="@+id/connectionServiceMessage" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceMedium" - android:visibility="gone" - android:padding="@dimen/call_banner_side_padding" - android:background="@android:color/white" /> + </LinearLayout> - </LinearLayout> + <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. --> + <FrameLayout + android:id="@+id/answer_and_dialpad_container" + android:layout_width="match_parent" + android:elevation="7dp" + android:layout_height="match_parent" /> + + <FrameLayout + android:id="@+id/floating_end_call_action_button_container" + android:layout_width="@dimen/end_call_floating_action_button_diameter" + android:layout_height="@dimen/end_call_floating_action_button_diameter" + android:background="@drawable/fab_red" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true"> + + <ImageButton android:id="@+id/floating_end_call_action_button" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/end_call_background" + android:src="@drawable/fab_ic_end_call" + android:scaleType="center" + android:contentDescription="@string/onscreenEndCallText" /> + + </FrameLayout> + + <FrameLayout + android:layout_height="match_parent" + android:layout_width="0dp" + android:layout_weight="1" + android:visibility="gone"> - <RelativeLayout + <FrameLayout + android:layout_height="match_parent" android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="2"> - - <FrameLayout + android:id="@+id/call_card_content"> + + <ImageView android:id="@+id/photoLarge" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="centerCrop" + android:contentDescription="@string/contactPhoto" + android:background="@color/incall_photo_background_color" + android:src="@drawable/img_no_image_automirrored" /> + + <!-- Call context --> + <LinearLayout + android:id="@+id/contact_context" android:layout_height="match_parent" android:layout_width="match_parent" - android:id="@+id/call_card_content"> - - <!-- Contact photo for primary call info --> - <ImageView android:id="@+id/photoLarge" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:scaleType="centerCrop" - android:importantForAccessibility="no" - android:background="@color/incall_photo_background_color" - android:src="@drawable/img_no_image_automirrored" /> - - <!-- Call context --> - <LinearLayout - android:id="@+id/contact_context" - android:layout_height="match_parent" - android:layout_width="match_parent" - android:orientation="vertical" - android:background="@color/incall_background_color" - android:visibility="gone"> - <TextView android:id="@+id/contactContextTitle" - android:textSize="@dimen/contact_context_title_text_size" - android:textColor="@color/contact_context_title_text_color" - android:fontFamily="sans-serif-medium" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="@dimen/contact_context_title_margin_bottom"/> - <ListView android:id="@+id/contactContextInfo" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:divider="@null" - android:dividerHeight="@dimen/contact_context_list_item_padding"/> - </LinearLayout> - </FrameLayout> - - <fragment android:name="com.android.incallui.VideoCallFragment" - android:id="@+id/videoCallFragment" - android:layout_alignParentTop="true" - android:layout_gravity="top|center_horizontal" - android:layout_width="match_parent" - android:layout_height="match_parent" /> - - <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. --> - <FrameLayout - android:id="@+id/progressSpinner" - android:background="#63000000" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" + android:orientation="vertical" + android:background="@color/incall_background_color" android:visibility="gone"> - - <ProgressBar - android:id="@+id/progress_bar" - style="@android:style/Widget.Material.ProgressBar" - android:layout_gravity="center" - android:layout_width="48dp" - android:layout_height="48dp" - android:indeterminate="true" /> - - </FrameLayout> - - - <include layout="@layout/manage_conference_call_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> - - <!-- Placeholder for various fragments that are added dynamically underneath the caller info. --> - <FrameLayout - android:id="@+id/answer_and_dialpad_container" - android:layout_gravity="bottom|center_horizontal" - android:layout_alignParentBottom="true" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:elevation="@dimen/dialpad_elevation" /> - - <FrameLayout - android:id="@+id/floating_end_call_action_button_container" - android:layout_width="@dimen/end_call_floating_action_button_diameter" - android:layout_height="@dimen/end_call_floating_action_button_diameter" - android:background="@drawable/fab_red" - android:layout_alignParentBottom="true" - android:layout_centerHorizontal="true" - android:layout_marginBottom="@dimen/end_call_button_margin_bottom"> - - <ImageButton android:id="@+id/floating_end_call_action_button" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@drawable/end_call_background" - android:src="@drawable/fab_ic_end_call" - android:scaleType="center" - android:contentDescription="@string/onscreenEndCallText" /> - - </FrameLayout> - - </RelativeLayout> - - </LinearLayout> - <!-- Secondary "Call info" block, for the background ("on hold") call. --> - <include layout="@layout/secondary_call_info" /> -</RelativeLayout>
\ No newline at end of file + <TextView android:id="@+id/contactContextTitle" + android:textSize="@dimen/contact_context_title_text_size" + android:textColor="@color/glowpad_background_color" + android:fontFamily="sans-serif-medium" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="@dimen/contact_context_title_margin_bottom" /> + <ListView android:id="@+id/contactContextInfo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:divider="@null" + android:dividerHeight="@dimen/contact_context_list_item_padding" /> + </LinearLayout> + </FrameLayout> + + <include layout="@layout/manage_conference_call_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignTop="@id/photoLarge" /> + + <!-- Progress spinner, useful for indicating pending operations such as upgrade to video. --> + <FrameLayout + android:id="@+id/progressSpinner" + android:background="#63000000" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:visibility="gone" > + + <ProgressBar + android:id="@+id/progress_bar" + style="@android:style/Widget.Material.ProgressBar" + android:layout_gravity="center" + android:layout_width="48dp" + android:layout_height="48dp" + android:indeterminate="true" /> + + </FrameLayout> + + <fragment android:name="com.android.incallui.VideoCallFragment" + android:layout_alignParentStart="true" + android:layout_gravity="start|center_vertical" + android:id="@+id/videoCallFragment" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + </FrameLayout> + +</RelativeLayout> diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml index 5dcebd0dd..2aa583c18 100644 --- a/InCallUI/res/layout/primary_call_info.xml +++ b/InCallUI/res/layout/primary_call_info.xml @@ -21,212 +21,201 @@ other status info. This info is shown as a "banner" overlaid across the top of contact photo. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:orientation="horizontal" - android:minHeight="@dimen/call_banner_height" - android:paddingStart="@dimen/call_banner_side_padding" - android:paddingEnd="@dimen/call_banner_side_padding" - android:animateLayoutChanges="true" - android:gravity="center"> - - <LinearLayout android:id="@+id/primary_call_banner" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_weight="1" android:orientation="vertical" + android:paddingStart="@dimen/call_banner_side_padding" + android:paddingEnd="@dimen/call_banner_side_padding" android:clipChildren="false" android:clipToPadding="false" android:gravity="center"> - <LinearLayout android:id="@+id/callSubjectLayout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:clipChildren="false" - android:clipToPadding="false"> - - <TextView android:id="@+id/callSubject" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAlignment="viewStart" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_background_color" - android:textSize="@dimen/call_label_text_size" - android:background="@drawable/subject_bubble" - android:maxLines="2" - android:ellipsize="end" - android:singleLine="false" - android:visibility="gone" /> - </LinearLayout> + <LinearLayout android:id="@+id/callSubjectLayout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:clipChildren="false" + android:clipToPadding="false"> + + <TextView android:id="@+id/callSubject" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAlignment="viewStart" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/incall_call_banner_background_color" + android:textSize="@dimen/call_label_text_size" + android:background="@drawable/subject_bubble" + android:maxLines="2" + android:ellipsize="end" + android:singleLine="false" + android:visibility="gone" /> + </LinearLayout> - <LinearLayout android:id="@+id/callStateButton" - android:layout_width="match_parent" + <LinearLayout android:id="@+id/callStateButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:clipChildren="false" + android:clipToPadding="false"> + + <ImageView android:id="@+id/workProfileIcon" + android:src="@drawable/ic_work_profile" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - android:clipChildren="false" - android:clipToPadding="false"> + android:layout_weight="0" + android:layout_marginEnd="8dp" + android:baselineAlignBottom="true" + android:tint="@color/incall_accent_color" + android:scaleType="center" + android:visibility="gone" /> - <ImageView android:id="@+id/workProfileIcon" - android:src="@drawable/ic_work_profile" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:layout_marginEnd="8dp" - android:baselineAlignBottom="true" - android:tint="@color/incall_accent_color" - android:scaleType="center" - android:visibility="gone" /> + <!-- Subscription provider or WiFi calling icon displayed to the left of the label --> + <ImageView android:id="@+id/callStateIcon" + android:layout_width="24dp" + android:layout_height="match_parent" + android:layout_marginEnd="10dp" + android:tint="@color/incall_accent_color" + android:alpha="0.0" + android:scaleType="fitCenter" + android:visibility="gone" /> - <!-- Subscription provider or WiFi calling icon displayed to the left of the label --> - <ImageView android:id="@+id/callStateIcon" - android:layout_width="24dp" - android:layout_height="match_parent" - android:layout_marginEnd="10dp" - android:tint="@color/incall_accent_color" - android:alpha="0.0" - android:scaleType="fitCenter" - android:visibility="gone" /> + <ImageView android:id="@+id/videoCallIcon" + android:src="@drawable/ic_toolbar_video" + android:layout_width="16dp" + android:layout_height="match_parent" + android:layout_marginEnd="16dp" + android:baselineAlignBottom="true" + android:tint="@color/incall_accent_color" + android:scaleType="center" + android:visibility="gone" /> - <ImageView android:id="@+id/videoCallIcon" - android:src="@drawable/ic_toolbar_video" - android:layout_width="16dp" - android:layout_height="match_parent" - android:layout_marginEnd="16dp" - android:baselineAlignBottom="true" - android:tint="@color/incall_accent_color" - android:scaleType="center" - android:visibility="gone" /> + <com.android.phone.common.widget.ResizingTextTextView + xmlns:ex="http://schemas.android.com/apk/res-auto" + android:id="@+id/callStateLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAlignment="viewStart" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textColor="@color/incall_accent_color" + android:textSize="@dimen/call_status_text_size" + android:alpha="0.7" + android:singleLine="true" + android:gravity="start" + android:ellipsize="end" + ex:resizing_text_min_size="@dimen/call_status_text_min_size" /> - <com.android.phone.common.widget.ResizingTextTextView - xmlns:ex="http://schemas.android.com/apk/res-auto" - android:id="@+id/callStateLabel" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textAlignment="viewStart" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textColor="@color/incall_accent_color" - android:textSize="@dimen/call_status_text_size" - android:alpha="0.7" - android:singleLine="true" - android:gravity="start" - android:ellipsize="end" - ex:resizing_text_min_size="@dimen/call_status_text_min_size" /> + </LinearLayout> - </LinearLayout> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <RelativeLayout + <!-- Name (or the phone number, if we don't have a name to display). --> + <com.android.phone.common.widget.ResizingTextTextView + xmlns:ex="http://schemas.android.com/apk/res-auto" + android:id="@+id/name" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:layout_marginTop="-5dp" + android:fontFamily="sans-serif-light" + android:textAlignment="viewStart" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textSize="@dimen/call_name_text_size" + android:singleLine="true" + ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> + + <!-- Contact photo for primary call info --> + <ImageView android:id="@+id/photoSmall" + android:layout_width="@dimen/contact_context_small_photo_size" + android:layout_height="@dimen/contact_context_small_photo_size" + android:layout_centerVertical="true" + android:layout_alignParentEnd="true" + android:scaleType="centerCrop" + android:importantForAccessibility="no" + android:src="@drawable/img_no_image_automirrored" /> + </RelativeLayout> - <!-- Name (or the phone number, if we don't have a name to display). --> - <com.android.phone.common.widget.ResizingTextTextView - xmlns:ex="http://schemas.android.com/apk/res-auto" - android:id="@+id/name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="-5dp" - android:fontFamily="sans-serif-light" - android:textAlignment="viewStart" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="@dimen/call_name_text_size" - android:singleLine="true" - ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> - - <!-- Contact photo for primary call info --> - <ImageView android:id="@+id/photoSmall" - android:layout_width="@dimen/contact_context_small_photo_size" - android:layout_height="@dimen/contact_context_small_photo_size" - android:layout_centerVertical="true" - android:layout_alignParentEnd="true" - android:scaleType="centerCrop" - android:importantForAccessibility="no" - android:src="@drawable/img_no_image_automirrored" /> - </RelativeLayout> - - <LinearLayout - android:layout_width="match_parent" + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:clipChildren="false" + android:clipToPadding="false"> + + <ImageView android:id="@+id/hdAudioIcon" + android:src="@drawable/ic_hd_24dp" + android:layout_width="24dp" + android:layout_height="match_parent" + android:layout_marginEnd="8dp" + android:tint="@color/incall_call_banner_subtext_color" + android:scaleType="fitCenter" + android:visibility="gone" /> + + <ImageView android:id="@+id/forwardIcon" + android:src="@drawable/ic_forward_white_24dp" + android:layout_width="24dp" + android:layout_height="match_parent" + android:layout_marginEnd="8dp" + android:tint="@color/incall_call_banner_subtext_color" + android:scaleType="fitCenter" + android:visibility="gone" /> + + <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side --> + <LinearLayout android:id="@+id/labelAndNumber" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - android:clipChildren="false" - android:clipToPadding="false"> - - <ImageView android:id="@+id/hdAudioIcon" - android:src="@drawable/ic_hd_24dp" - android:layout_width="24dp" - android:layout_height="match_parent" - android:layout_marginEnd="8dp" - android:tint="@color/incall_call_banner_subtext_color" - android:scaleType="fitCenter" - android:visibility="gone" /> + android:layout_weight="1" + android:orientation="horizontal"> - <ImageView android:id="@+id/forwardIcon" - android:src="@drawable/ic_forward_white_24dp" - android:layout_width="24dp" - android:layout_height="match_parent" - android:layout_marginEnd="8dp" - android:tint="@color/incall_call_banner_subtext_color" - android:scaleType="fitCenter" + <TextView android:id="@+id/label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="0" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/incall_call_banner_subtext_color" + android:textSize="@dimen/call_label_text_size" + android:singleLine="true" + android:textDirection="ltr" android:visibility="gone" /> - <!-- Label (like "Mobile" or "Work", if present) and phone number, side by side --> - <LinearLayout android:id="@+id/labelAndNumber" + <TextView android:id="@+id/phoneNumber" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" - android:orientation="horizontal"> - - <TextView android:id="@+id/label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_subtext_color" - android:textSize="@dimen/call_label_text_size" - android:singleLine="true" - android:textDirection="ltr" - android:visibility="gone" /> - - <TextView android:id="@+id/phoneNumber" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_marginStart="6dp" - android:textAlignment="viewStart" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_subtext_color" - android:textSize="@dimen/call_label_text_size" - android:singleLine="false" - android:visibility="gone" /> - - </LinearLayout> - - <!-- Elapsed time indication for a call in progress. --> - <TextView android:id="@+id/elapsedTime" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:textAlignment="viewEnd" + android:layout_marginStart="6dp" + android:textAlignment="viewStart" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/incall_call_banner_subtext_color" android:textSize="@dimen/call_label_text_size" - android:singleLine="true" + android:singleLine="false" android:visibility="gone" /> </LinearLayout> - <!-- Call type indication: a special label and/or branding - for certain kinds of calls (like "SIP call" for a SIP call.) --> - <TextView android:id="@+id/callTypeLabel" + <!-- Elapsed time indication for a call in progress. --> + <TextView android:id="@+id/elapsedTime" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_weight="0" + android:textAlignment="viewEnd" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_text_color" - android:maxLines="1" - android:ellipsize="end" + android:textColor="@color/incall_call_banner_subtext_color" + android:textSize="@dimen/call_label_text_size" + android:singleLine="true" android:visibility="gone" /> </LinearLayout> -</LinearLayout> <!-- End of call_banner --> + + <!-- Call type indication: a special label and/or branding + for certain kinds of calls (like "SIP call" for a SIP call.) --> + <TextView android:id="@+id/callTypeLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/incall_call_banner_text_color" + android:maxLines="1" + android:ellipsize="end" + android:visibility="gone" /> + +</LinearLayout> <!-- End of call_banner --> diff --git a/InCallUI/res/values-h600dp/dimens.xml b/InCallUI/res/values-h600dp/dimens.xml new file mode 100644 index 000000000..12f48d9b5 --- /dev/null +++ b/InCallUI/res/values-h600dp/dimens.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2016 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<resources> + <dimen name="call_banner_height">90dp</dimen> + + <dimen name="end_call_button_margin_bottom">15dp</dimen> + + <dimen name="floating_action_button_vertical_offset">-24dp</dimen> +</resources> diff --git a/InCallUI/res/values-land/colors.xml b/InCallUI/res/values-w600dp-land/colors.xml index 77eea2e68..77eea2e68 100644 --- a/InCallUI/res/values-land/colors.xml +++ b/InCallUI/res/values-w600dp-land/colors.xml diff --git a/InCallUI/res/values-land/dimens.xml b/InCallUI/res/values-w600dp-land/dimens.xml index 59a5a9a87..59a5a9a87 100644 --- a/InCallUI/res/values-land/dimens.xml +++ b/InCallUI/res/values-w600dp-land/dimens.xml diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml index 439bb41f5..d6c47a2c7 100644 --- a/InCallUI/res/values/dimens.xml +++ b/InCallUI/res/values/dimens.xml @@ -21,7 +21,9 @@ <!-- Dimensions for CallCard elements (the normal in-call UI) --> - <dimen name="call_banner_height">90dp</dimen> + <dimen name="call_banner_height">0dp</dimen> + <dimen name="call_banner_vertical_margin">20dp</dimen> + <dimen name="incall_action_bar_elevation">3dp</dimen> <!-- Margin between the bottom of the "call card" photo @@ -68,7 +70,7 @@ <dimen name="dialpad_digits_adjustable_height">50dp</dimen> <dimen name="dialpad_key_numbers_size">36dp</dimen> - <dimen name="floating_action_button_vertical_offset">-24dp</dimen> + <dimen name="floating_action_button_vertical_offset">-10dp</dimen> <dimen name="call_button_margin_vertical">8dp</dimen> <dimen name="call_button_margin_horizontal">6dp</dimen> @@ -104,7 +106,7 @@ <!-- Height of translucent shadow effect --> <dimen name="translucent_shadow_height">2dp</dimen> - <dimen name="end_call_button_margin_bottom">8dp</dimen> + <dimen name="end_call_button_margin_bottom">2dp</dimen> <dimen name="call_card_anim_translate_y_offset">50dp</dimen> |