[DO NOT MERGE] Contacts to display UI improvements (1/2)
* Remove the wrench icon.
* Move arrow to the right.
* Move list item to the left to be aligned with back button.
* Remove tablets layout so that it looks similar on phones and tablets.
* Add SAVE button to toolbar.
* Left-align "Contacts in custom view" header with hamburger menu.
* Change account text color when it's expanded/collapsed.
* Add divider view below group item so that we can show dividers between accounts
by wrapping the existing content in custom_contact_list_filter_group with a
LinearLayout and putting a divider below.
* Change text color.
Bug 30198034
Change-Id: Id4bc9e65fbf163195e7e1ce3847735e5d9af848c
(cherry picked from commit 56432fc8c78305d9f108a83f3c9a92153dc5ab5c)
diff --git a/res-common/values/colors.xml b/res-common/values/colors.xml
index 2e1b739..b555bff 100644
--- a/res-common/values/colors.xml
+++ b/res-common/values/colors.xml
@@ -179,4 +179,8 @@
<color name="snackbar_action_text">#40c4ff</color>
<!-- Background color for a snackbar. -->
<color name="snackbar_background">#333333</color>
+
+ <!-- Color of account/custom filters -->
+ <color name="account_filter_text_color">@color/actionbar_text_color_black</color>
+ <color name="custom_filter_divider">#dbdbdb</color>
</resources>
diff --git a/res-common/values/dimens.xml b/res-common/values/dimens.xml
index 6fe1f7a..8acd801 100644
--- a/res-common/values/dimens.xml
+++ b/res-common/values/dimens.xml
@@ -45,17 +45,24 @@
<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_action_button_width">72dp</dimen>
<!-- Padding to be used between a visible scrollbar and the contact list -->
<dimen name="list_visible_scrollbar_padding">32dip</dimen>
<dimen name="contact_browser_list_header_icon_left_margin">16dp</dimen>
+ <dimen name="contact_browser_list_header_icon_right_margin">14dp</dimen>
<dimen name="contact_browser_list_header_left_margin">16dip</dimen>
<dimen name="contact_browser_list_header_right_margin">@dimen/list_visible_scrollbar_padding</dimen>
<dimen name="contact_browser_list_item_text_indent">8dip</dimen>
<dimen name="contact_browser_list_header_height">48dp</dimen>
<dimen name="contact_browser_list_header_icon_size">24dp</dimen>
- <dimen name="contact_browser_list_header_text_margin">24dp</dimen>
+ <dimen name="contact_browser_list_header_text_margin">10dp</dimen>
<!-- Width of a contact list item section header. -->
<dimen name="contact_list_section_header_width">48dp</dimen>
diff --git a/res-common/values/ids.xml b/res-common/values/ids.xml
index 4ba65e1..e084bf3 100644
--- a/res-common/values/ids.xml
+++ b/res-common/values/ids.xml
@@ -32,9 +32,11 @@
<item type="id" name="cliv_phoneticname_textview"/>
<item type="id" name="cliv_label_textview"/>
<item type="id" name="cliv_data_view"/>
-
+
<!-- For tag ids used by ContactPhotoManager to tag views with contact details -->
<item type="id" name="tag_display_name"/>
<item type="id" name="tag_identifier"/>
<item type="id" name="tag_contact_type"/>
+
+ <item type="id" name="menu_save"/>
</resources>
diff --git a/res-common/values/strings.xml b/res-common/values/strings.xml
index e8112fb..182e3fb 100644
--- a/res-common/values/strings.xml
+++ b/res-common/values/strings.xml
@@ -701,6 +701,9 @@
<!-- Title of the activity that allows the user to customize filtering of contact list [CHAR LIMIT=128] -->
<string name="custom_list_filter">Define customized view</string>
+ <!-- Menu item to save changes to custom filter. [CHAR LIMIT=15] -->
+ <string name="menu_custom_filter_save">Save</string>
+
<!-- Query hint displayed inside the search field [CHAR LIMIT=64] -->
<string name="hint_findContacts">Search contacts</string>
diff --git a/res-common/values/styles.xml b/res-common/values/styles.xml
index b99c1bd..168816a 100644
--- a/res-common/values/styles.xml
+++ b/res-common/values/styles.xml
@@ -70,6 +70,14 @@
<style name="ContactListFilterTheme" parent="@android:Theme.Holo.Light">
<item name="android:listViewStyle">@style/ListViewStyle</item>
+ <item name="android:actionButtonStyle">@style/FilterActionButtonStyle</item>
+ </style>
+
+ <!-- Adding padding to action button doesn't move it to left, we increase the button width to
+ make margin between the button and screen edge 16dp -->
+ <style name="FilterActionButtonStyle" parent="@android:Widget.ActionButton">
+ <item name="android:minWidth">@dimen/contact_filter_action_button_width</item>
+ <item name="android:textColor">@color/actionbar_text_color</item>
</style>
<style name="CustomContactListFilterView" parent="ContactListFilterTheme">