Merge "[DO NOT MERGE] Contacts to display UI improvements (1/2)" into ub-contactsdialer-f-dev
diff --git a/res-common/drawable-hdpi/ic_menu_settings_holo_light.png b/res-common/drawable-hdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index b7bb5c4..0000000
--- a/res-common/drawable-hdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-ldrtl-hdpi/ic_menu_settings_holo_light.png b/res-common/drawable-ldrtl-hdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index c3d86ca..0000000
--- a/res-common/drawable-ldrtl-hdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-ldrtl-mdpi/ic_menu_settings_holo_light.png b/res-common/drawable-ldrtl-mdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index ac172b2..0000000
--- a/res-common/drawable-ldrtl-mdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-ldrtl-xhdpi/ic_menu_settings_holo_light.png b/res-common/drawable-ldrtl-xhdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index d3a334a..0000000
--- a/res-common/drawable-ldrtl-xhdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-mdpi/ic_menu_settings_holo_light.png b/res-common/drawable-mdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index 1ebc112..0000000
--- a/res-common/drawable-mdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-xhdpi/ic_menu_settings_holo_light.png b/res-common/drawable-xhdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index 68ba92b..0000000
--- a/res-common/drawable-xhdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/drawable-xxhdpi/ic_menu_settings_holo_light.png b/res-common/drawable-xxhdpi/ic_menu_settings_holo_light.png
deleted file mode 100644
index 5b672a3..0000000
--- a/res-common/drawable-xxhdpi/ic_menu_settings_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/res-common/layout/account_filter_header.xml b/res-common/layout/account_filter_header.xml
index 72ca8fd..f053fe0 100644
--- a/res-common/layout/account_filter_header.xml
+++ b/res-common/layout/account_filter_header.xml
@@ -32,6 +32,7 @@
android:layout_height="@dimen/contact_browser_list_header_icon_size"
android:layout_width="@dimen/contact_browser_list_header_icon_size"
android:layout_marginStart="@dimen/contact_browser_list_header_icon_left_margin"
+ android:layout_marginEnd="@dimen/contact_browser_list_header_icon_right_margin"
android:layout_gravity="center_vertical"/>
<TextView
diff --git a/res-common/layout/contact_list_filter_custom.xml b/res-common/layout/contact_list_filter_custom.xml
index b6d9229..845d52f 100644
--- a/res-common/layout/contact_list_filter_custom.xml
+++ b/res-common/layout/contact_list_filter_custom.xml
@@ -25,10 +25,6 @@
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:overScrollMode="always" />
<View
@@ -40,27 +36,4 @@
android:layout_marginEnd="16dip"
android:background="?android:attr/dividerHorizontal" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- style="?android:attr/buttonBarStyle">
-
- <Button
- android:id="@+id/btn_discard"
- style="?android:attr/buttonBarButtonStyle"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@android:string/cancel" />
-
- <Button
- android:id="@+id/btn_done"
- style="?android:attr/buttonBarButtonStyle"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@android:string/ok" />
-
- </LinearLayout>
</LinearLayout>
diff --git a/res-common/layout/contact_list_filter_item.xml b/res-common/layout/contact_list_filter_item.xml
index 09bbe55..9f4fa47 100644
--- a/res-common/layout/contact_list_filter_item.xml
+++ b/res-common/layout/contact_list_filter_item.xml
@@ -42,6 +42,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/account_filter_text_color"
android:singleLine="true"
android:ellipsize="end"/>
@@ -51,7 +52,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorTertiary"
+ android:textColor="@color/account_filter_text_color"
android:singleLine="true"
android:ellipsize="end"/>
</LinearLayout>
diff --git a/res-common/layout/custom_contact_list_filter_account.xml b/res-common/layout/custom_contact_list_filter_account.xml
index b1f3f2b..7fd9fba 100644
--- a/res-common/layout/custom_contact_list_filter_account.xml
+++ b/res-common/layout/custom_contact_list_filter_account.xml
@@ -19,9 +19,9 @@
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
- android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
+ android:paddingLeft="@dimen/contact_filter_list_item_padding_start"
android:paddingRight="?android:attr/scrollbarSize"
- android:paddingStart="?android:attr/expandableListPreferredItemPaddingLeft"
+ android:paddingStart="@dimen/contact_filter_list_item_padding_start"
android:paddingEnd="?android:attr/scrollbarSize">
<RelativeLayout
diff --git a/res-common/layout/custom_contact_list_filter_group.xml b/res-common/layout/custom_contact_list_filter_group.xml
index bd8c604..1c68387 100644
--- a/res-common/layout/custom_contact_list_filter_group.xml
+++ b/res-common/layout/custom_contact_list_filter_group.xml
@@ -17,60 +17,77 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
+ android:minHeight="@dimen/contact_filter_list_item_height"
android:gravity="center_vertical"
- android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
- android:paddingRight="?android:attr/scrollbarSize"
- android:paddingStart="?android:attr/expandableListPreferredItemPaddingLeft"
- android:paddingEnd="?android:attr/scrollbarSize"
->
+ android:orientation="vertical">
- <RelativeLayout
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="6dip"
- android:layout_marginEnd="6dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="6dip"
- android:layout_weight="1"
- android:duplicateParentState="true"
- >
-
- <TextView
- android:id="@android:id/text1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:duplicateParentState="true"
- />
-
- <TextView
- android:id="@android:id/text2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/text1"
- android:layout_alignLeft="@android:id/text1"
- android:layout_alignStart="@android:id/text1"
- android:maxLines="2"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:duplicateParentState="true"
- />
-
- </RelativeLayout>
-
- <CheckBox
- 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:minHeight="@dimen/contact_filter_list_item_height"
android:gravity="center_vertical"
- android:orientation="vertical"
- android:duplicateParentState="true"
- />
+ android:paddingLeft="@dimen/contact_filter_list_item_padding_start"
+ android:paddingRight="?android:attr/scrollbarSize"
+ android:paddingStart="@dimen/contact_filter_list_item_padding_start"
+ android:paddingEnd="?android:attr/scrollbarSize">
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="6dip"
+ android:layout_marginEnd="6dip"
+ android:layout_marginTop="6dip"
+ android:layout_marginBottom="6dip"
+ android:layout_weight="1"
+ android:duplicateParentState="true"
+ >
+
+ <TextView
+ android:id="@android:id/text1"
+ android:layout_width="wrap_content"
+ 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:textColor="@color/account_filter_text_color"
+ android:duplicateParentState="true"
+ />
+
+ <TextView
+ android:id="@android:id/text2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/text1"
+ android:layout_alignLeft="@android:id/text1"
+ android:layout_alignStart="@android:id/text1"
+ android:maxLines="2"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/account_filter_text_color"
+ android:duplicateParentState="true"
+ />
+
+ </RelativeLayout>
+
+ <CheckBox
+ 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"
+ android:orientation="vertical"
+ android:duplicateParentState="true"
+ />
+
+ </LinearLayout>
+
+ <View
+ android:id="@+id/adapter_divider_bottom"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:background="@color/custom_filter_divider" />
</LinearLayout>
diff --git a/res-common/values-sw600dp/dimens.xml b/res-common/values-sw600dp/dimens.xml
index cf736f7..d438e6b 100644
--- a/res-common/values-sw600dp/dimens.xml
+++ b/res-common/values-sw600dp/dimens.xml
@@ -20,7 +20,9 @@
<dimen name="contact_browser_list_header_left_margin">@dimen/list_visible_scrollbar_padding</dimen>
<dimen name="contact_browser_list_header_right_margin">24dip</dimen>
<dimen name="contact_browser_list_top_margin">16dip</dimen>
- <dimen name="contact_browser_list_header_text_margin">32dp</dimen>
+ <dimen name="contact_browser_list_header_text_margin">18dp</dimen>
+
+ <dimen name="contact_filter_list_item_padding_start">24dp</dimen>
<!-- Right margin of the floating action button -->
<dimen name="floating_action_button_margin_right">32dp</dimen>
diff --git a/res-common/values-sw600dp/styles.xml b/res-common/values-sw600dp/styles.xml
deleted file mode 100644
index 2130ce1..0000000
--- a/res-common/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
- ~ Copyright (C) 2012 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<resources>
- <style name="ContactListFilterTheme" parent="@android:Theme.Holo.Light.Dialog">
- <item name="android:windowCloseOnTouchOutside">true</item>
- <item name="android:listViewStyle">@style/ListViewStyle</item>
- </style>
-
- <style name="CustomContactListFilterView" parent="ContactListFilterTheme">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">400dip</item>
- </style>
-
-</resources>
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">