diff options
author | Danny Baumann <dannybaumann@web.de> | 2014-09-24 13:57:05 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2014-09-25 10:29:58 +0200 |
commit | 169277774eab6fc6273c97661c0ba8cb792608fd (patch) | |
tree | 38cfa66fa913fad48bd47eaac4f7673a72c7de87 | |
parent | 4507937fe7dfd89493e9e82195630108872de2a1 (diff) | |
download | android_packages_apps_Dialer-169277774eab6fc6273c97661c0ba8cb792608fd.tar.gz android_packages_apps_Dialer-169277774eab6fc6273c97661c0ba8cb792608fd.tar.bz2 android_packages_apps_Dialer-169277774eab6fc6273c97661c0ba8cb792608fd.zip |
Sync landscape layouts to their portrait counterparts.
Change-Id: Ifee64bd0eab86b4f9547e77dd673c16c25286e5d
JIRA: NIGHTLIES-204
-rw-r--r-- | res/layout-land/call_detail.xml | 165 | ||||
-rw-r--r-- | res/layout-land/call_detail_history_header.xml | 61 | ||||
-rw-r--r-- | res/layout-land/call_stats_detail.xml | 147 | ||||
-rw-r--r-- | res/layout/call_detail_history_header.xml | 4 | ||||
-rw-r--r-- | res/layout/call_detail_pinned_header.xml | 2 | ||||
-rwxr-xr-x | res/layout/call_log_fragment.xml | 2 | ||||
-rw-r--r-- | res/layout/call_stats_fragment.xml | 2 | ||||
-rw-r--r-- | res/values-land/dimens.xml | 19 | ||||
-rw-r--r-- | res/values-land/styles.xml | 5 | ||||
-rw-r--r-- | res/values/dimens.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 8 |
11 files changed, 33 insertions, 384 deletions
diff --git a/res/layout-land/call_detail.xml b/res/layout-land/call_detail.xml index 7024e1c3c..54642aed5 100644 --- a/res/layout-land/call_detail.xml +++ b/res/layout-land/call_detail.xml @@ -35,171 +35,8 @@ /> <!-- All the controls which are part of the pinned header are in this layout. --> - <RelativeLayout - android:id="@+id/controls" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" - > - <FrameLayout - android:id="@+id/voicemail_status" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" - android:visibility="gone" - > - <include layout="@layout/call_log_voicemail_status"/> - </FrameLayout> - - <view - class="com.android.contacts.common.widget.ProportionalLayout" - android:id="@+id/contact_background_sizer" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/voicemail_status" - ex:ratio="0.25" - ex:direction="widthToHeight" - > - <ImageView - android:id="@+id/contact_background" - android:layout_width="match_parent" - android:layout_height="0dip" - android:adjustViewBounds="true" - android:scaleType="centerCrop" - /> - </view> - - <LinearLayout - android:id="@+id/separator" - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="@color/background_dialer_light" - android:layout_below="@+id/contact_background_sizer" - /> - <View - android:id="@+id/photo_text_bar" - android:layout_width="match_parent" - android:layout_height="42dip" - android:background="@color/call_detail_photo_bg" - android:layout_alignParentStart="true" - android:layout_alignBottom="@id/contact_background_sizer" - /> - <ImageView - android:id="@+id/main_action" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:scaleType="center" - android:layout_alignEnd="@id/photo_text_bar" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_alignTop="@id/photo_text_bar" - android:layout_marginEnd="@dimen/call_log_outer_margin" - /> - <TextView - android:id="@+id/header_text" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:layout_alignStart="@id/photo_text_bar" - android:layout_toLeftOf="@id/main_action" - android:layout_alignTop="@id/photo_text_bar" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_marginEnd="@dimen/call_log_inner_margin" - android:layout_marginStart="@dimen/call_detail_contact_name_margin" - android:gravity="center_vertical" - android:textColor="?attr/call_log_header_color" - android:textAppearance="?android:attr/textAppearanceMedium" - android:singleLine="true" - /> - <ImageButton - android:id="@+id/main_action_push_layer" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignStart="@id/contact_background_sizer" - android:layout_alignTop="@id/contact_background_sizer" - android:layout_alignEnd="@id/contact_background_sizer" - android:layout_alignBottom="@id/contact_background_sizer" - android:background="?android:attr/selectableItemBackground" - /> - <LinearLayout - android:id="@+id/voicemail_container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/separator" - android:paddingBottom="@dimen/call_detail_button_spacing"> - <!-- The voicemail fragment will be put here. --> - </LinearLayout> - <FrameLayout - android:id="@+id/call_and_sms" - android:layout_width="match_parent" - android:layout_height="@dimen/call_log_list_item_height" - android:layout_marginBottom="@dimen/call_detail_button_spacing" - android:layout_below="@id/voicemail_container" - android:gravity="center_vertical" - android:background="@color/background_dialer_list_items" - > - - <LinearLayout - android:id="@+id/call_and_sms_main_action" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - > - - <LinearLayout - android:layout_width="0dip" - android:layout_height="match_parent" - android:layout_weight="1" - android:paddingStart="@dimen/call_log_indent_margin" - android:orientation="vertical" - android:gravity="center_vertical" - > - - <TextView android:id="@+id/call_and_sms_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingEnd="@dimen/call_log_icon_margin" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?attr/call_log_primary_text_color" - android:singleLine="true" - android:ellipsize="end" - /> - - <TextView android:id="@+id/call_and_sms_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingEnd="@dimen/call_log_icon_margin" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?attr/call_log_primary_text_color" - android:textAllCaps="true" - android:singleLine="true" - android:ellipsize="end" - /> - </LinearLayout> - - <View android:id="@+id/call_and_sms_divider" - android:layout_width="1px" - android:layout_height="32dip" - android:background="@color/background_dialer_light" - android:layout_gravity="center_vertical" - /> + <include layout="@layout/call_detail_pinned_header"/> - <ImageView android:id="@+id/call_and_sms_icon" - android:layout_width="@color/call_log_voicemail_highlight_color" - android:layout_height="match_parent" - android:paddingStart="@dimen/call_log_inner_margin" - android:paddingEnd="@dimen/call_log_outer_margin" - android:gravity="center" - android:scaleType="centerInside" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - /> - </LinearLayout> - </FrameLayout> - </RelativeLayout> <!-- Used to hide the UI when playing a voicemail and the proximity sensor is detecting something near the screen. diff --git a/res/layout-land/call_detail_history_header.xml b/res/layout-land/call_detail_history_header.xml deleted file mode 100644 index 58728b9f7..000000000 --- a/res/layout-land/call_detail_history_header.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2009 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. ---> - -<!-- This layout is supposed to match the content of the controls in call_detail.xml --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:ex="http://schemas.android.com/apk/res-auto" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <!-- Contact photo. --> - <view - class="com.android.contacts.common.widget.ProportionalLayout" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/voicemail_status" - ex:ratio="0.25" - ex:direction="widthToHeight" - > - <!-- Proportional layout requires a view in it. --> - <View - android:layout_width="wrap_content" - android:layout_height="wrap_content" - /> - </view> - <!-- Separator line --> - <View - android:layout_width="match_parent" - android:layout_height="1dip" - /> - <!-- Voicemail controls --> - <!-- TODO: Make the height be based on a constant. --> - <View - android:id="@+id/header_voicemail_container" - android:layout_width="match_parent" - android:layout_height="140dip" - android:layout_marginBottom="@dimen/call_detail_button_spacing" - /> - <!-- Call and SMS --> - <View - android:id="@+id/header_call_and_sms_container" - android:layout_width="match_parent" - android:layout_height="@dimen/call_log_list_item_height" - /> - -</LinearLayout> diff --git a/res/layout-land/call_stats_detail.xml b/res/layout-land/call_stats_detail.xml index 24c5d01ae..8c350d8e7 100644 --- a/res/layout-land/call_stats_detail.xml +++ b/res/layout-land/call_stats_detail.xml @@ -73,152 +73,7 @@ </LinearLayout> <!-- The contents of the title block --> - - <RelativeLayout - android:id="@+id/controls" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" > - - <com.android.contacts.common.widget.ProportionalLayout - android:id="@+id/contact_background_sizer" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - ex:direction="widthToHeight" - ex:ratio="0.25" > - - <ImageView - android:id="@+id/contact_background" - android:layout_width="match_parent" - android:layout_height="0dip" - android:adjustViewBounds="true" - android:scaleType="centerCrop" /> - - </com.android.contacts.common.widget.ProportionalLayout> - - <LinearLayout - android:id="@+id/separator" - android:layout_width="match_parent" - android:layout_height="1dip" - android:layout_below="@+id/contact_background_sizer" - android:background="@color/background_dialer_light" /> - - <View - android:id="@+id/photo_text_bar" - android:layout_width="match_parent" - android:layout_height="42dip" - android:layout_alignBottom="@id/contact_background_sizer" - android:layout_alignParentStart="true" - android:background="@color/call_detail_photo_bg" /> - - <ImageView - android:id="@+id/main_action" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_alignEnd="@id/photo_text_bar" - android:layout_alignTop="@id/photo_text_bar" - android:layout_marginEnd="@dimen/call_log_outer_margin" - android:scaleType="center" /> - - <TextView - android:id="@+id/header_text" - android:layout_width="wrap_content" - android:layout_height="0dip" - android:layout_alignBottom="@id/photo_text_bar" - android:layout_alignStart="@id/photo_text_bar" - android:layout_alignTop="@id/photo_text_bar" - android:layout_marginStart="@dimen/call_detail_contact_name_margin" - android:layout_marginEnd="@dimen/call_log_inner_margin" - android:layout_toStartOf="@id/main_action" - android:gravity="center_vertical" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?attr/call_log_header_color" /> - - <ImageButton - android:id="@+id/main_action_push_layer" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignBottom="@id/contact_background_sizer" - android:layout_alignStart="@id/contact_background_sizer" - android:layout_alignEnd="@id/contact_background_sizer" - android:layout_alignTop="@id/contact_background_sizer" - android:background="?android:attr/selectableItemBackground" /> - - <FrameLayout - android:id="@+id/call_and_sms" - android:layout_width="match_parent" - android:layout_height="@dimen/call_log_list_item_height" - android:layout_below="@id/main_action_push_layer" - android:layout_marginBottom="@dimen/call_detail_button_spacing" - android:layout_marginTop="@dimen/call_detail_button_spacing" - android:background="@color/background_dialer_list_items" - android:gravity="center_vertical" > - - <LinearLayout - android:id="@+id/call_and_sms_main_action" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="?android:attr/selectableItemBackground" - android:focusable="true" - android:orientation="horizontal" > - - <LinearLayout - android:layout_width="0dip" - android:layout_height="match_parent" - android:layout_weight="1" - android:gravity="center_vertical" - android:orientation="vertical" - android:paddingStart="@dimen/call_log_indent_margin" > - - <TextView - android:id="@+id/call_and_sms_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="end" - android:paddingEnd="@dimen/call_log_icon_margin" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?attr/call_log_primary_text_color" /> - - <TextView - android:id="@+id/call_and_sms_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="end" - android:paddingEnd="@dimen/call_log_icon_margin" - android:singleLine="true" - android:textAllCaps="true" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?attr/call_log_primary_text_color" /> - </LinearLayout> - - <View - android:id="@+id/call_and_sms_divider" - android:layout_width="1px" - android:layout_height="32dip" - android:layout_gravity="center_vertical" - android:background="@color/background_dialer_light" /> - - <ImageView - android:id="@+id/call_and_sms_icon" - android:layout_width="@color/call_log_voicemail_highlight_color" - android:layout_height="match_parent" - android:background="?android:attr/selectableItemBackground" - android:focusable="true" - android:gravity="center" - android:paddingStart="@dimen/call_log_inner_margin" - android:paddingEnd="@dimen/call_log_outer_margin" - android:scaleType="centerInside" /> - - </LinearLayout> - - </FrameLayout> - - </RelativeLayout> + <include layout="@layout/call_detail_pinned_header" /> </RelativeLayout> diff --git a/res/layout/call_detail_history_header.xml b/res/layout/call_detail_history_header.xml index 40f943b1e..7cdfaaa5e 100644 --- a/res/layout/call_detail_history_header.xml +++ b/res/layout/call_detail_history_header.xml @@ -27,9 +27,7 @@ class="com.android.contacts.common.widget.ProportionalLayout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/voicemail_status" - ex:ratio="0.5" + ex:ratio="@dimen/call_detail_header_photo_ratio" ex:direction="widthToHeight" > <!-- Proportional layout requires a view in it. --> diff --git a/res/layout/call_detail_pinned_header.xml b/res/layout/call_detail_pinned_header.xml index 8fd87cdfa..6ef9e585f 100644 --- a/res/layout/call_detail_pinned_header.xml +++ b/res/layout/call_detail_pinned_header.xml @@ -40,7 +40,7 @@ android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_below="@id/voicemail_status" - ex:ratio="0.5" + ex:ratio="@dimen/call_detail_header_photo_ratio" ex:direction="widthToHeight" > <ImageView diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml index 011685a6d..6273694dc 100755 --- a/res/layout/call_log_fragment.xml +++ b/res/layout/call_log_fragment.xml @@ -18,7 +18,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="?android:attr/actionBarSize" + style="@style/CallLogFragment" android:orientation="vertical" android:divider="?android:attr/dividerHorizontal" android:showDividers="end"> diff --git a/res/layout/call_stats_fragment.xml b/res/layout/call_stats_fragment.xml index 2c734baec..c625d4d1a 100644 --- a/res/layout/call_stats_fragment.xml +++ b/res/layout/call_stats_fragment.xml @@ -19,7 +19,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="?android:attr/actionBarSize" + style="@style/CallLogFragment" android:divider="?android:attr/dividerHorizontal" android:orientation="vertical" android:showDividers="end" > diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml new file mode 100644 index 000000000..cba9d97d0 --- /dev/null +++ b/res/values-land/dimens.xml @@ -0,0 +1,19 @@ +<!-- + Copyright (C) 2012 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> + <item name="call_detail_header_photo_ratio" type="dimen" format="float">0.25</item> +</resources> diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index 1388a17f1..ef640ec0c 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -15,8 +15,7 @@ --> <resources> - - <style name="FragmentActionBarPadding"> - <item name="android:paddingBottom">0dp</item> + <style name="CallLogFragment"> + <item name="android:paddingTop">0dp</item> </style> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 35ff8694e..d209df50e 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -135,4 +135,6 @@ <dimen name="call_stats_details_chart_size">140dip</dimen> <dimen name="speed_dial_list_contact_photo_size">40dp</dimen> + + <item name="call_detail_header_photo_ratio" type="dimen" format="float">0.5</item> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index e9b951286..74a636d59 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -248,10 +248,6 @@ <item name="android:textAllCaps">true</item> </style> - <style name="FragmentActionBarPadding"> - <item name="android:paddingBottom">?android:attr/actionBarSize</item> - </style> - <style name="DialtactsSearchboxStyle" parent="@android:style/Widget.EditText"> <item name="android:background">@null</item> <item name="android:textColorHint">@color/searchbox_text_color</item> @@ -261,4 +257,8 @@ <item name="android:paddingLeft">@dimen/dismiss_button_padding_start</item> <item name="android:paddingRight">@dimen/dismiss_button_padding_end</item> </style> + + <style name="CallLogFragment"> + <item name="android:paddingTop">?android:attr/actionBarSize</item> + </style> </resources> |