Contacts to display UI tweaks
- Contacts to display view
* Make divider edge-to-edge.
* Keep paddings around list items so that they are left-
aligned on phones and tablets.
* Change size of account type and name texts so that they
are the same as those in Settings.
* Move account type and name texts and radio button up by 1dp
* Move arrow indicator to right by 4dp.
- Define custom view
* Change size of account type and name texts so that they
are the same as those in Settings.
* Change size of group texts.
* Move check box to right by 4dp.
Bug 30198034
Change-Id: Idddd0627abdb9d15e708d39f733e3f24f5995447
diff --git a/res-common/layout/contact_list_filter.xml b/res-common/layout/contact_list_filter.xml
index d419c7e..34c713c 100644
--- a/res-common/layout/contact_list_filter.xml
+++ b/res-common/layout/contact_list_filter.xml
@@ -26,18 +26,10 @@
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="0dip"
- android:layout_weight="1"
- android:layout_marginLeft="@dimen/contact_filter_left_margin"
- android:layout_marginRight="@dimen/contact_filter_right_margin"
- android:layout_marginStart="@dimen/contact_filter_left_margin"
- android:layout_marginEnd="@dimen/contact_filter_right_margin" />
+ android:layout_weight="1" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"
- android:layout_marginStart="16dip"
- android:layout_marginEnd="16dip"
android:background="?android:attr/dividerHorizontal" />
</LinearLayout>
diff --git a/res-common/layout/contact_list_filter_item.xml b/res-common/layout/contact_list_filter_item.xml
index 9f4fa47..9f297e6 100644
--- a/res-common/layout/contact_list_filter_item.xml
+++ b/res-common/layout/contact_list_filter_item.xml
@@ -20,6 +20,8 @@
android:descendantFocusability="blocksDescendants"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingStart="@dimen/contact_filter_left_margin"
+ android:paddingEnd="@dimen/contact_filter_right_margin"
android:minHeight="@dimen/contact_filter_item_min_height"
android:gravity="center_vertical">
@@ -33,6 +35,7 @@
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="-1dip"
android:orientation="vertical"
android:layout_marginLeft="8dip"
android:layout_marginStart="8dip">
@@ -41,7 +44,7 @@
android:id="@+id/accountType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="@color/account_filter_text_color"
android:singleLine="true"
android:ellipsize="end"/>
@@ -51,7 +54,7 @@
android:layout_marginTop="-3dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="@color/account_filter_text_color"
android:singleLine="true"
android:ellipsize="end"/>
@@ -60,7 +63,6 @@
<RadioButton
android:id="@+id/radioButton"
android:clickable="false"
- android:layout_marginTop="1dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical" />
diff --git a/res-common/layout/custom_contact_list_filter_account.xml b/res-common/layout/custom_contact_list_filter_account.xml
index 7fd9fba..c7a6cb5 100644
--- a/res-common/layout/custom_contact_list_filter_account.xml
+++ b/res-common/layout/custom_contact_list_filter_account.xml
@@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="?android:attr/textAppearanceListItem"
android:duplicateParentState="true" />
<TextView
@@ -51,7 +51,7 @@
android:layout_alignLeft="@android:id/text1"
android:layout_alignStart="@android:id/text1"
android:maxLines="1"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorTertiary"
android:duplicateParentState="true" />
diff --git a/res-common/layout/custom_contact_list_filter_group.xml b/res-common/layout/custom_contact_list_filter_group.xml
index 1c68387..c67ce16 100644
--- a/res-common/layout/custom_contact_list_filter_group.xml
+++ b/res-common/layout/custom_contact_list_filter_group.xml
@@ -48,8 +48,7 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
- android:textSize="@dimen/contact_browser_list_item_text_size"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="@color/account_filter_text_color"
android:duplicateParentState="true"
/>
@@ -62,7 +61,7 @@
android:layout_alignLeft="@android:id/text1"
android:layout_alignStart="@android:id/text1"
android:maxLines="2"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="@color/account_filter_text_color"
android:duplicateParentState="true"
/>
@@ -73,8 +72,6 @@
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginRight="4dip"
- android:layout_marginEnd="4dip"
android:focusable="false"
android:clickable="false"
android:gravity="center_vertical"
diff --git a/res-common/values-sw600dp/dimens.xml b/res-common/values-sw600dp/dimens.xml
index d438e6b..4e812fd 100644
--- a/res-common/values-sw600dp/dimens.xml
+++ b/res-common/values-sw600dp/dimens.xml
@@ -23,6 +23,7 @@
<dimen name="contact_browser_list_header_text_margin">18dp</dimen>
<dimen name="contact_filter_list_item_padding_start">24dp</dimen>
+ <dimen name="contact_filter_left_margin">16dp</dimen>
<!-- Right margin of the floating action button -->
<dimen name="floating_action_button_margin_right">32dp</dimen>
diff --git a/res-common/values/dimens.xml b/res-common/values/dimens.xml
index 8acd801..dc010ec 100644
--- a/res-common/values/dimens.xml
+++ b/res-common/values/dimens.xml
@@ -41,15 +41,15 @@
<dimen name="contact_tile_shadowbox_height">48sp</dimen>
<!-- For contact filter setting screens -->
- <dimen name="contact_filter_left_margin">16dip</dimen>
+ <dimen name="contact_filter_left_margin">8dp</dimen>
<dimen name="contact_filter_right_margin">16dip</dimen>
<dimen name="contact_filter_item_min_height">48dip</dimen>
<dimen name="contact_filter_icon_size">32dip</dimen>
<dimen name="contact_filter_list_item_height">56dp</dimen>
<dimen name="contact_filter_list_item_padding_start">16dp</dimen>
<!-- contact_filter_indicator is the arrow in expandable list view -->
- <dimen name="contact_filter_indicator_padding_start">10dp</dimen>
- <dimen name="contact_filter_indicator_padding_end">50dp</dimen>
+ <dimen name="contact_filter_indicator_padding_start">6dp</dimen>
+ <dimen name="contact_filter_indicator_padding_end">46dp</dimen>
<dimen name="contact_filter_action_button_width">72dp</dimen>
<!-- Padding to be used between a visible scrollbar and the contact list -->