diff options
author | Danny Baumann <dannybaumann@web.de> | 2014-09-10 08:33:03 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2014-09-10 08:00:16 +0000 |
commit | 9b95e6e033dbeb0a0141715589147715275d1e82 (patch) | |
tree | 00e2e1a78937680c1aba780ace7184f4b16ef508 /res | |
parent | a0121a0db893cc01ba6fa91a4ca117379f213449 (diff) | |
download | android_packages_apps_Dialer-9b95e6e033dbeb0a0141715589147715275d1e82.tar.gz android_packages_apps_Dialer-9b95e6e033dbeb0a0141715589147715275d1e82.tar.bz2 android_packages_apps_Dialer-9b95e6e033dbeb0a0141715589147715275d1e82.zip |
Sync call_detail and call_stats_detail layouts.
Move the header controls into a common layout so the same controls are
present for both cases. This essentially reverts
d8ebf219d7716a9da16abc2bad9e5cb5c12e1d56 and replaces it with a better
solution.
Also properly hide/show secondary icon divider.
Change-Id: Ibafeededfde293128599becfab93c17dd84c1391
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/call_detail.xml | 207 | ||||
-rw-r--r-- | res/layout/call_detail_pinned_header.xml | 223 | ||||
-rw-r--r-- | res/layout/call_stats_detail.xml | 148 |
3 files changed, 225 insertions, 353 deletions
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml index 0c6b78142..4b02280b2 100644 --- a/res/layout/call_detail.xml +++ b/res/layout/call_detail.xml @@ -15,7 +15,6 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:ex="http://schemas.android.com/apk/res-auto" android:id="@+id/call_detail" android:layout_width="match_parent" android:layout_height="match_parent" @@ -34,212 +33,8 @@ android:layout_alignParentTop="true" /> - <!-- 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.5" - 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" - /> - - <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" - /> - - <View android:id="@+id/videocall_and_sms_divider" - android:layout_width="1px" - android:layout_height="32dip" - android:background="@drawable/ic_divider_dashed_holo_dark" - android:layout_gravity="center_vertical" - android:visibility="gone" - /> - - <ImageView android:id="@+id/videocall" - android:layout_width="@color/call_log_voicemail_highlight_color" - android:layout_height="match_parent" - android:paddingLeft="@dimen/call_log_inner_margin" - android:paddingRight="@dimen/call_log_outer_margin" - android:gravity="center" - android:scaleType="centerInside" - android:visibility="gone" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" - /> - - <View android:id="@+id/videocall_and_sms_divider" - android:layout_width="1px" - android:layout_height="32dip" - android:background="@drawable/ic_divider_dashed_holo_dark" - android:layout_gravity="center_vertical" - android:visibility="gone" - /> + <include layout="@layout/call_detail_pinned_header"/> - <ImageView android:id="@+id/videocall" - android:layout_width="@color/call_log_voicemail_highlight_color" - android:layout_height="match_parent" - android:paddingLeft="@dimen/call_log_inner_margin" - android:paddingRight="@dimen/call_log_outer_margin" - android:gravity="center" - android:scaleType="centerInside" - android:visibility="gone" - 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/call_detail_pinned_header.xml b/res/layout/call_detail_pinned_header.xml new file mode 100644 index 000000000..8fd87cdfa --- /dev/null +++ b/res/layout/call_detail_pinned_header.xml @@ -0,0 +1,223 @@ +<?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. +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:ex="http://schemas.android.com/apk/res-auto" + 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.5" + 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" + /> + + <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" + /> + + <View android:id="@+id/videocall_and_sms_divider" + android:layout_width="1px" + android:layout_height="32dip" + android:background="@drawable/ic_divider_dashed_holo_dark" + android:layout_gravity="center_vertical" + android:visibility="gone" + /> + + <ImageView android:id="@+id/videocall" + android:layout_width="@color/call_log_voicemail_highlight_color" + android:layout_height="match_parent" + android:paddingLeft="@dimen/call_log_inner_margin" + android:paddingRight="@dimen/call_log_outer_margin" + android:gravity="center" + android:scaleType="centerInside" + android:visibility="gone" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" + /> + + <View android:id="@+id/videocall_and_sms_divider" + android:layout_width="1px" + android:layout_height="32dip" + android:background="@drawable/ic_divider_dashed_holo_dark" + android:layout_gravity="center_vertical" + android:visibility="gone" + /> + + <ImageView android:id="@+id/videocall" + android:layout_width="@color/call_log_voicemail_highlight_color" + android:layout_height="match_parent" + android:paddingLeft="@dimen/call_log_inner_margin" + android:paddingRight="@dimen/call_log_outer_margin" + android:gravity="center" + android:scaleType="centerInside" + android:visibility="gone" + android:focusable="true" + android:background="?android:attr/selectableItemBackground" + /> + </LinearLayout> + </FrameLayout> +</RelativeLayout> + diff --git a/res/layout/call_stats_detail.xml b/res/layout/call_stats_detail.xml index eb3b7738f..86ead26d7 100644 --- a/res/layout/call_stats_detail.xml +++ b/res/layout/call_stats_detail.xml @@ -72,153 +72,7 @@ <include layout="@layout/call_stats_detail_info" /> </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.5" > - - <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> |