Further clean-up of PhoneFavoriteFragment in Dialer app.
Moving dependencies of Dialer PhoneFavoriteFragment. Mostly filtering
dependencies.
Bug: 6993891
Change-Id: Ic2b29b80ae2367f54e619b30bdb71b098c8a0deb
diff --git a/res-common/values/attrs.xml b/res-common/values/attrs.xml
index eae9c36..745ceb1 100644
--- a/res-common/values/attrs.xml
+++ b/res-common/values/attrs.xml
@@ -11,7 +11,7 @@
~ 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
+ ~ limitations under the License.
-->
<resources>
@@ -45,4 +45,10 @@
<attr name="list_item_data_width_weight" format="integer"/>
<attr name="list_item_label_width_weight" format="integer"/>
</declare-styleable>
+
+ <declare-styleable name="ContactBrowser">
+ <attr name="contact_browser_list_padding_left" format="dimension"/>
+ <attr name="contact_browser_list_padding_right" format="dimension"/>
+ <attr name="contact_browser_background" format="reference"/>
+ </declare-styleable>
</resources>
diff --git a/res-common/values/colors.xml b/res-common/values/colors.xml
index 48ef4ec..7600087 100644
--- a/res-common/values/colors.xml
+++ b/res-common/values/colors.xml
@@ -33,4 +33,9 @@
<!-- Color of the status message for starred contacts in the People app -->
<color name="people_contact_tile_status_color">#CCCCCC</color>
+
+ <color name="shortcut_overlay_text_background">#7f000000</color>
+
+ <color name="textColorIconOverlay">#fff</color>
+ <color name="textColorIconOverlayShadow">#000</color>
</resources>
diff --git a/res-common/values/dimens.xml b/res-common/values/dimens.xml
index 8901aea..43c29e8 100644
--- a/res-common/values/dimens.xml
+++ b/res-common/values/dimens.xml
@@ -58,4 +58,29 @@
<!-- Width of the Type-Label in the Editor -->
<dimen name="editor_type_label_width">100dip</dimen>
+
+ <!-- For contact filter setting screens -->
+ <dimen name="contact_filter_left_margin">16dip</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>
+
+ <!-- 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_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>
+
+ <!-- Size of the shortcut icon. 0dip means: use the system default -->
+ <dimen name="shortcut_icon_size">0dip</dimen>
+
+ <!-- Width of darkened border for shortcut icon -->
+ <dimen name="shortcut_icon_border_width">1dp</dimen>
+
+ <!-- Text size of shortcut icon overlay text -->
+ <dimen name="shortcut_overlay_text_size">12dp</dimen>
+
+ <!-- Extra vertical padding for darkened background behind shortcut icon overlay text -->
+ <dimen name="shortcut_overlay_text_background_padding">1dp</dimen>
</resources>
diff --git a/res-common/values/strings.xml b/res-common/values/strings.xml
index fc966ee..12c906e 100644
--- a/res-common/values/strings.xml
+++ b/res-common/values/strings.xml
@@ -366,4 +366,51 @@
Middle Name, Last Name, Name Suffix).
[CHAR LIMIT=NONE] -->
<string name="expand_collapse_name_fields_description">Expand or collapse name fields</string>
+
+
+ <!-- Contact list filter label indicating that the list is showing all available accounts [CHAR LIMIT=64] -->
+ <string name="list_filter_all_accounts">All contacts</string>
+
+ <!-- Contact list filter label indicating that the list is showing all starred contacts [CHAR LIMIT=64] -->
+ <string name="list_filter_all_starred">Starred</string>
+
+ <!-- Contact list filter selection indicating that the list shows groups chosen by the user [CHAR LIMIT=64] -->
+ <string name="list_filter_customize">Customize</string>
+
+ <!-- Contact list filter selection indicating that the list shows only the selected contact [CHAR LIMIT=64] -->
+ <string name="list_filter_single">Contact</string>
+
+ <!-- List title for a special contacts group that covers all contacts. [CHAR LIMIT=25] -->
+ <string name="display_ungrouped">All other contacts</string>
+
+ <!-- List title for a special contacts group that covers all contacts that
+a ren't members of any other group. [CHAR LIMIT=25] -->
+ <string name="display_all_contacts">All contacts</string>
+
+ <string name="menu_sync_remove">Remove sync group</string>
+ <string name="dialog_sync_add">Add sync group</string>
+ <string name="display_more_groups">More groups\u2026</string>
+
+ <!-- Warning message given to users just before they remove a currently syncing
+ group that would also cause all ungrouped contacts to stop syncing. [CHAR LIMIT=NONE] -->
+ <string name="display_warn_remove_ungrouped">Removing \"<xliff:g id="group" example="Starred">%s</xliff:g>\" from sync will also remove any ungrouped contacts from sync.</string>
+
+ <!-- Displayed in a spinner dialog as user changes to display options are saved -->
+ <string name="savingDisplayGroups">Saving display options\u2026</string>
+
+ <!-- Menu item to indicate you are done editing a contact and want to save the changes you've made -->
+ <string name="menu_done">Done</string>
+
+ <!-- Menu item to indicate you want to cancel the current editing process and NOT save the changes you've made [CHAR LIMIT=12] -->
+ <string name="menu_doNotSave">Cancel</string>
+
+ <!-- Displayed at the top of the contacts showing the account filter selected [CHAR LIMIT=64] -->
+ <string name="listAllContactsInAccount">Contacts in <xliff:g id="name" example="abc@gmail.com">%s</xliff:g></string>
+
+ <!-- Displayed at the top of the contacts showing single contact. [CHAR LIMIT=64] -->
+ <string name="listCustomView">Contacts in custom view</string>
+
+ <!-- Displayed at the top of the contacts showing single contact. [CHAR LIMIT=64] -->
+ <string name="listSingleContact">Single contact</string>
+
</resources>
diff --git a/res-common/values/styles.xml b/res-common/values/styles.xml
index 7522f99..7a43243 100644
--- a/res-common/values/styles.xml
+++ b/res-common/values/styles.xml
@@ -40,4 +40,18 @@
<item name="android:singleLine">true</item>
<item name="android:textAllCaps">true</item>
</style>
+
+ <style name="ListViewStyle" parent="@android:style/Widget.Holo.Light.ListView">
+ <item name="android:overScrollMode">always</item>
+ </style>
+
+ <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">match_parent</item>
+ </style>
</resources>