diff options
author | Tyler Gunn <tgunn@google.com> | 2014-03-04 22:52:56 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-04 22:52:56 +0000 |
commit | 714104dd1e04446d7511bdbd5394817a8725cafa (patch) | |
tree | aa472bddc70b424e0c4ead8dd1c6775c25ab2d0b | |
parent | 8f4eea101297030d905cb3373af5b7fe43fbf99c (diff) | |
parent | 04717efa7cb23244a63d5146b28319801a1abf73 (diff) |
am 04717efa: Move secondary action view/button out of primary action view to provide a more clear separation of the pressable areas for both.
* commit '04717efa7cb23244a63d5146b28319801a1abf73':
Move secondary action view/button out of primary action view to provide a more clear separation of the pressable areas for both.
-rw-r--r-- | res/layout/call_log_list_item.xml | 93 |
1 files changed, 52 insertions, 41 deletions
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 15d7a9275..e39b41314 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -34,9 +34,20 @@ @id/call_log_item gone --> + <!-- Linear layout to separate the primary area containing the contact badge and caller + information and the secondary action (call details / play voicemail). --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical" + > + + <!-- Primary area containing the contact badge and caller information --> <LinearLayout android:id="@+id/primary_action_view" - android:layout_width="match_parent" + android:layout_width="0dp" + android:layout_weight="1" android:layout_height="wrap_content" android:layout_centerVertical="true" android:padding="@dimen/call_log_outer_margin" @@ -46,7 +57,7 @@ android:focusable="true" android:nextFocusRight="@+id/secondary_action_icon" android:nextFocusLeft="@+id/quick_contact_photo" - > + > <QuickContactBadge android:id="@+id/quick_contact_photo" android:layout_width="@dimen/call_log_list_contact_photo_size" @@ -54,7 +65,7 @@ android:nextFocusRight="@id/primary_action_view" android:layout_alignParentStart="true" android:focusable="true" - /> + /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" @@ -62,7 +73,7 @@ android:orientation="vertical" android:gravity="center_vertical" android:layout_marginStart="@dimen/call_log_inner_margin" - > + > <TextView android:id="@+id/name" android:layout_width="wrap_content" @@ -71,12 +82,12 @@ android:textColor="?attr/call_log_primary_text_color" android:textSize="16sp" android:singleLine="true" - /> + /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - > + > <TextView android:id="@+id/label" android:layout_width="wrap_content" @@ -87,13 +98,13 @@ android:singleLine="true" android:ellipsize="marquee" /> - </LinearLayout> + </LinearLayout> <LinearLayout android:id="@+id/call_type" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - > + > <view class="com.android.dialer.calllog.CallTypeIconsView" android:id="@+id/call_type_icons" @@ -101,7 +112,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="@dimen/call_log_icon_margin" android:layout_gravity="center_vertical" - /> + /> <TextView android:id="@+id/call_count_and_date" android:layout_width="wrap_content" @@ -111,43 +122,43 @@ android:textColor="?attr/call_log_secondary_text_color" android:textSize="12sp" android:singleLine="true" - /> + /> </LinearLayout> </LinearLayout> - <!-- Linear layout to house a vertical separator line and the - secondary action button. Used as a convenience to hide both - the separator and action button at the same time. --> - <LinearLayout - android:id="@+id/secondary_action_view" - android:layout_width="wrap_content" + </LinearLayout> + <!-- Linear layout to house a vertical separator line and the secondary action button. + Used as a convenience to hide both the separator and action button at the same + time. --> + <LinearLayout + android:id="@+id/secondary_action_view" + android:layout_width="@dimen/call_log_call_action_width" + android:layout_height="match_parent" + android:orientation="horizontal" + android:gravity="center_vertical" + > + <!-- Thin vertical divider to visually separate the secondary action button --> + <View + android:id="@+id/vertical_divider" + android:layout_width="@dimen/call_log_list_item_vertical_divider_width" android:layout_height="match_parent" - android:orientation="horizontal" - android:gravity="center_vertical" - > - <!-- Thin vertical divider to visually separate the secondary action button --> - <View - android:id="@+id/vertical_divider" - android:layout_width="@dimen/call_log_list_item_vertical_divider_width" - android:layout_height="match_parent" - android:layout_marginTop="@dimen/call_log_list_item_vertical_divider_margin" - android:layout_marginBottom="@dimen/call_log_list_item_vertical_divider_margin" - android:background="?android:attr/dividerVertical"/> - <!-- The secondary action button; either play voicemail or call details. --> - <ImageButton - android:id="@+id/secondary_action_icon" - android:layout_width="@dimen/call_log_call_action_width" - android:layout_height="match_parent" - android:paddingStart="@dimen/call_log_inner_margin" - android:paddingTop="@dimen/call_log_inner_margin" - android:paddingBottom="@dimen/call_log_inner_margin" - android:paddingEnd="@dimen/call_log_inner_margin" - android:scaleType="center" - android:background="?android:attr/selectableItemBackground" - android:nextFocusLeft="@id/primary_action_view" + android:layout_marginTop="@dimen/call_log_list_item_vertical_divider_margin" + android:layout_marginBottom="@dimen/call_log_list_item_vertical_divider_margin" + android:background="?android:attr/dividerVertical"/> + <!-- The secondary action button; either play voicemail or call details. --> + <ImageButton + android:id="@+id/secondary_action_icon" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingStart="@dimen/call_log_inner_margin" + android:paddingTop="@dimen/call_log_inner_margin" + android:paddingBottom="@dimen/call_log_inner_margin" + android:paddingEnd="@dimen/call_log_inner_margin" + android:scaleType="center" + android:background="?android:attr/selectableItemBackground" + android:nextFocusLeft="@id/primary_action_view" /> - </LinearLayout> </LinearLayout> - + </LinearLayout> <TextView android:id="@+id/call_log_header" style="@style/ContactListSeparatorTextViewStyle" |