diff options
author | Andrew Lee <anwlee@google.com> | 2015-05-07 22:04:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-07 22:04:15 +0000 |
commit | 432cfa109479782f1c5765a1ad80d332b8781310 (patch) | |
tree | 03811db84a59e2ebd96fbbc223e0e774b6e28b13 /res/layout | |
parent | 99413b41c5af53bf00d6726822aceba3f5baea73 (diff) | |
parent | 51c2bde72ee4674266ac464bea2aba72d217d75f (diff) |
Merge "Update layouts for call log list item actions." into mnc-dev
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/call_log_list_item.xml | 169 | ||||
-rw-r--r-- | res/layout/call_log_list_item_actions.xml | 82 |
2 files changed, 141 insertions, 110 deletions
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 5928183f8..af8cb8b03 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -35,127 +35,132 @@ android:paddingTop="@dimen/call_log_day_group_padding_top" android:paddingBottom="@dimen/call_log_day_group_padding_bottom" /> - <!-- Linear layout to separate the primary area containing the contact badge and caller - information and the secondary action (call details / play voicemail). --> <android.support.v7.widget.CardView android:id="@+id/call_log_row" style="@style/CallLogCardStyle"> - <!-- Primary area containing the contact badge and caller information --> <LinearLayout - android:id="@+id/primary_action_view" - android:background="?android:attr/selectableItemBackground" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="@dimen/call_log_start_margin" - android:paddingEnd="@dimen/call_log_outer_margin" - android:paddingTop="@dimen/call_log_vertical_padding" - android:paddingBottom="@dimen/call_log_vertical_padding" - android:orientation="horizontal" - android:gravity="center_vertical" - android:focusable="true" - android:nextFocusRight="@+id/call_back_action" - android:nextFocusLeft="@+id/quick_contact_photo" > - - <QuickContactBadge - android:id="@+id/quick_contact_photo" - android:layout_width="@dimen/contact_photo_size" - android:layout_height="@dimen/contact_photo_size" - android:paddingTop="2dp" - android:nextFocusRight="@id/primary_action_view" - android:layout_gravity="top" - android:focusable="true" /> + android:orientation="vertical"> + <!-- Primary area containing the contact badge and caller information --> <LinearLayout - android:layout_width="0dp" + android:id="@+id/primary_action_view" + android:background="?android:attr/selectableItemBackground" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" + android:paddingStart="@dimen/call_log_start_margin" + android:paddingEnd="@dimen/call_log_outer_margin" + android:paddingTop="@dimen/call_log_vertical_padding" + android:paddingBottom="@dimen/call_log_vertical_padding" + android:orientation="horizontal" android:gravity="center_vertical" - android:layout_marginStart="@dimen/call_log_start_margin"> - - <TextView - android:id="@+id/name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/call_log_name_margin_bottom" - android:layout_marginEnd="@dimen/call_log_icon_margin" - android:textColor="?attr/call_log_primary_text_color" - android:textSize="@dimen/call_log_primary_text_size" - android:singleLine="true" /> - - <TextView - android:id="@+id/voicemail_transcription" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/call_log_icon_margin" - android:textColor="?attr/call_log_secondary_text_color" - android:textSize="@dimen/call_log_secondary_text_size" - android:singleLine="true" - android:ellipsize="marquee" - android:visibility="gone" /> + android:focusable="true" + android:nextFocusRight="@+id/call_back_action" + android:nextFocusLeft="@+id/quick_contact_photo" > + + <QuickContactBadge + android:id="@+id/quick_contact_photo" + android:layout_width="@dimen/contact_photo_size" + android:layout_height="@dimen/contact_photo_size" + android:paddingTop="2dp" + android:nextFocusRight="@id/primary_action_view" + android:layout_gravity="top" + android:focusable="true" /> <LinearLayout - android:id="@+id/call_type" - android:layout_width="wrap_content" + android:layout_width="0dp" android:layout_height="wrap_content" - android:orientation="horizontal"> + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center_vertical" + android:layout_marginStart="@dimen/call_log_list_item_info_margin_start"> + + <TextView + android:id="@+id/name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/call_log_name_margin_bottom" + android:layout_marginEnd="@dimen/call_log_icon_margin" + android:textColor="?attr/call_log_primary_text_color" + android:textSize="@dimen/call_log_primary_text_size" + android:singleLine="true" /> - <view - class="com.android.dialer.calllog.CallTypeIconsView" - android:id="@+id/call_type_icons" + <TextView + android:id="@+id/voicemail_transcription" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/call_log_icon_margin" - android:layout_gravity="center_vertical" /> + android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" + android:singleLine="true" + android:ellipsize="marquee" + android:visibility="gone" /> + + <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" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/call_log_icon_margin" + android:layout_gravity="center_vertical" /> + + <TextView + android:id="@+id/call_location_and_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/call_log_icon_margin" + android:layout_gravity="center_vertical" + android:textColor="?attr/call_log_secondary_text_color" + android:textSize="@dimen/call_log_secondary_text_size" + android:singleLine="true" /> + + </LinearLayout> <TextView - android:id="@+id/call_location_and_date" + android:id="@+id/call_account_label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/call_log_icon_margin" - android:layout_gravity="center_vertical" android:textColor="?attr/call_log_secondary_text_color" android:textSize="@dimen/call_log_secondary_text_size" + android:visibility="gone" android:singleLine="true" /> </LinearLayout> - <TextView - android:id="@+id/call_account_label" + <ImageView + android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/call_log_icon_margin" - android:textColor="?attr/call_log_secondary_text_color" - android:textSize="@dimen/call_log_secondary_text_size" - android:visibility="gone" - android:singleLine="true" /> + android:background="?android:attr/selectableItemBackgroundBorderless" + android:src="@drawable/ic_card_phone" + android:tint="@color/recent_call_log_item_phone_icon_tint" + android:alpha="0.3" + android:contentDescription="@string/description_call_log_call_action" + android:visibility="gone" /> </LinearLayout> - <ImageView - android:id="@+id/call_icon" - android:layout_width="wrap_content" + <!-- Viewstub with additional expandable actions for a call log entry --> + <ViewStub android:id="@+id/call_log_entry_actions_stub" + android:inflatedId="@+id/call_log_entry_actions" + android:layout="@layout/call_log_list_item_actions" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginEnd="@dimen/call_log_icon_margin" - android:background="?android:attr/selectableItemBackgroundBorderless" - android:src="@drawable/ic_card_phone" - android:tint="@color/recent_call_log_item_phone_icon_tint" - android:alpha="0.3" - android:contentDescription="@string/description_call_log_call_action" - android:visibility="gone" /> + android:layout_gravity="bottom" /> </LinearLayout> - <!-- Viewstub with additional expandable actions for a call log entry --> - <ViewStub android:id="@+id/call_log_entry_actions_stub" - android:inflatedId="@+id/call_log_entry_actions" - android:layout="@layout/call_log_list_item_actions" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - </android.support.v7.widget.CardView> </LinearLayout> diff --git a/res/layout/call_log_list_item_actions.xml b/res/layout/call_log_list_item_actions.xml index 8ef92bf1a..43da5d21b 100644 --- a/res/layout/call_log_list_item_actions.xml +++ b/res/layout/call_log_list_item_actions.xml @@ -23,44 +23,70 @@ android:visibility="visible" android:importantForAccessibility="1"> - <!-- Temporary border spacer. --> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:layout_weight="1" - android:background="#eeeeee" /> - - <TextView + <LinearLayout android:id="@+id/video_call_action" - style="@style/CallLogActionsStyle" - android:background="?android:attr/selectableItemBackground" - android:text="@string/call_log_action_video_call" + style="@style/CallLogActionStyle" android:nextFocusLeft="@+id/primary_action_view" - android:nextFocusRight="@+id/voicemail_action" /> + android:nextFocusRight="@+id/voicemail_action"> - <TextView + <ImageView + style="@style/CallLogActionIconStyle" + android:src="@drawable/ic_videocam_24dp" /> + + <TextView + style="@style/CallLogActionTextStyle" + android:text="@string/call_log_action_video_call" /> + + </LinearLayout> + + <LinearLayout android:id="@+id/voicemail_action" - style="@style/CallLogActionsStyle" - android:background="?android:attr/selectableItemBackground" - android:text="@string/call_log_action_voicemail" + style="@style/CallLogActionStyle" android:nextFocusLeft="@+id/video_call_action" - android:nextFocusRight="@+id/details_action" /> + android:nextFocusRight="@+id/details_action"> + + <ImageView + style="@style/CallLogActionIconStyle" + android:src="@drawable/ic_voicemail_24dp" /> + + <TextView + style="@style/CallLogActionTextStyle" + android:text="@string/call_log_action_voicemail" + android:nextFocusLeft="@+id/video_call_action" + android:nextFocusRight="@+id/details_action" /> + + </LinearLayout> - <TextView + <LinearLayout android:id="@+id/details_action" - style="@style/CallLogActionsStyle" - android:background="?android:attr/selectableItemBackground" - android:text="@string/call_log_action_details" + style="@style/CallLogActionStyle" android:nextFocusLeft="@+id/voicemail_action" - android:nextFocusRight="@+id/report_action" /> + android:nextFocusRight="@+id/report_action"> - <TextView + <ImageView + style="@style/CallLogActionIconStyle" + android:src="@drawable/ic_more_horiz_24dp" /> + + <TextView + style="@style/CallLogActionTextStyle" + android:text="@string/call_log_action_details" /> + + </LinearLayout> + + <LinearLayout android:id="@+id/report_action" - style="@style/CallLogActionsStyle" - android:background="?android:attr/selectableItemBackground" - android:text="@string/call_log_action_report" + style="@style/CallLogActionStyle" android:nextFocusLeft="@+id/details_action" - android:nextFocusRight="@+id/primary_action_view" - android:visibility="gone" /> + android:nextFocusRight="@+id/primary_action_view"> + + <ImageView + style="@style/CallLogActionIconStyle" + android:src="@drawable/ic_report_problem_24dp" /> + + <TextView + style="@style/CallLogActionTextStyle" + android:text="@string/call_log_action_report" /> + + </LinearLayout> </LinearLayout> |