summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/ui/res/layout
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-02-05 16:32:14 -0800
committerCopybara-Service <copybara-piper@google.com>2018-02-05 17:50:01 -0800
commit4c185f69903230a32d5166e3e56f5246449d71d7 (patch)
tree1ec0d4eb51e41e86e20f4520648652bebe58512a /java/com/android/dialer/calllog/ui/res/layout
parent014ffe1d515841a065ae946596d743558d28d8f0 (diff)
Match redlines in new call log.
This includes: -Moved call count to after icons -Bold PhoneAccount for new calls -Fixed recycling issues in call type icons and phone account -Fixed cropping at bottom of "y" character (see b/67913060) -Reduced nesting in layout -Removed dimens.xml as it shouldn't be shared by voicemail -Set the alpha for Wifi/HD icons depending on read/unread status -Don't color call type icons, except for missed -Call type icons scale with display size -Call type icons are larger (18dp) in new UI Note that FrameLayout is used to ensure that icons/callCount view is not clipped, and instead contact name is ellipsized when the content is too wide to fit. Bug: 67913060,70989593,70989611 Test: unit and manual PiperOrigin-RevId: 184605728 Change-Id: Ie36c89354cbe4444ad2b42b6b0040430e396691c
Diffstat (limited to 'java/com/android/dialer/calllog/ui/res/layout')
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml124
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml12
2 files changed, 87 insertions, 49 deletions
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
index 77ba68124..093f866fc 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
@@ -19,33 +19,31 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/call_log_entry_top_margin"
- android:paddingTop="@dimen/call_log_entry_padding_top_start"
- android:paddingBottom="@dimen/call_log_entry_padding_bottom_end"
- android:paddingStart="@dimen/call_log_entry_padding_top_start"
- android:paddingEnd="@dimen/call_log_entry_padding_bottom_end"
- android:gravity="center_vertical">
+ android:minHeight="72dp">
<QuickContactBadge
android:id="@+id/quick_contact_photo"
- android:layout_width="@dimen/call_log_entry_photo_size"
- android:layout_height="@dimen/call_log_entry_photo_size"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:layout_centerVertical="true"
- android:padding="@dimen/call_log_entry_photo_padding"
android:focusable="true"/>
- <LinearLayout
+ <!-- The frame layout is necessary to avoid clipping the icons and ellipsize the text when the
+ content is too wide to fit.
+ -->
+ <FrameLayout
+ android:id="@+id/primary_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
android:layout_toEndOf="@+id/quick_contact_photo"
- android:layout_toStartOf="@+id/menu_button"
- android:orientation="vertical">
+ android:layout_toStartOf="@+id/menu_button">
- <!-- TODO(zachh): Optimize this layout -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="14dp"
android:orientation="horizontal">
<TextView
@@ -53,57 +51,95 @@
style="@style/PrimaryText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/call_log_entry_photo_text_margin"/>
+ android:layout_weight="1"
+ android:layout_marginEnd="6dp"
+ android:ellipsize="end"
+ android:lineSpacingMultiplier="1.5"
+ android:singleLine="true"/>
- <!-- HD and Wifi icons are shown adjacent to primary text. Call types are shown adjacent to
- secondary text (below). -->
- <com.android.dialer.calllogutils.CallTypeIconsView
- android:id="@+id/primary_call_type_icons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
- android:layout_gravity="center_vertical"/>
- </LinearLayout>
+ <ImageView
+ android:id="@+id/hd_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="18dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/quantum_ic_hd_vd_theme_24"
+ />
- <!-- TODO(zachh): Optimize this layout -->
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
+ <ImageView
+ android:id="@+id/wifi_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="18dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/quantum_ic_signal_wifi_4_bar_vd_theme_24"
+ />
- <!-- Only call types are shown adjacent to secondary text. HD and Wifi icons are shown
- adjacent to primary text (above). -->
- <com.android.dialer.calllogutils.CallTypeIconsView
- android:id="@+id/secondary_call_type_icons"
+ <ImageView
+ android:id="@+id/assisted_dial_icon"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
- android:layout_gravity="center_vertical"/>
+ android:layout_height="18dp"
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/quantum_ic_language_vd_theme_24"
+ />
<TextView
- android:id="@+id/secondary_text"
- style="@style/SecondaryText"
+ android:id="@+id/call_count"
+ style="@style/PrimaryText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/call_log_entry_photo_text_margin"/>
+ android:layout_marginEnd="6dp"
+ android:lineSpacingMultiplier="1.5"/>
+
</LinearLayout>
+ </FrameLayout>
+
+ <LinearLayout
+ android:id="@+id/secondary_row"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/primary_row"
+ android:layout_toEndOf="@+id/quick_contact_photo"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/call_type_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="18dp"
+ android:layout_gravity="center_vertical"
+ />
<TextView
- android:id="@+id/phone_account"
+ android:id="@+id/secondary_text"
style="@style/SecondaryText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/call_log_entry_photo_text_margin"
- android:visibility="gone"/>
+ android:ellipsize="end"
+ android:lineSpacingMultiplier="1.4"
+ android:singleLine="true"/>
</LinearLayout>
+ <TextView
+ android:id="@+id/phone_account"
+ style="@style/SecondaryText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/secondary_row"
+ android:layout_toEndOf="@+id/quick_contact_photo"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:visibility="gone"/>
+
<ImageView
android:id="@+id/menu_button"
- android:layout_width="@dimen/call_log_entry_menu_button_size"
- android:layout_height="@dimen/call_log_entry_menu_button_size"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="12dp"
+ android:layout_marginStart="4dp"
+ android:layout_marginEnd="4dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
+ android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
index 13575db55..e86ece534 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
@@ -16,14 +16,16 @@
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minHeight="48dp"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:height="48dp">
+ android:layout_height="wrap_content">
<TextView
android:id="@+id/new_call_log_header_text"
- style="@style/SecondaryText"
+ style="@style/SubHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/call_log_action_icon_margin_start"
- android:layout_centerVertical="true"/>
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_centerVertical="true"
+ android:layout_gravity="center_vertical"/>
</RelativeLayout>