Use image view when it's section header is a star
* Define mHeaderTextView as a View so that it can be ImageView and TextView
and rename it as mHeaderView.
* Hide pinned header when it's a star.
* Move section header to left by 14dp and make text and image center aligned.
* Make section header size 16sp.
* Make star pink.
Bug 28426878
Change-Id: I1aa563e5201e41487a7edd7cd861a62d8b662ff5
diff --git a/res-common/drawable/ic_material_star.xml b/res-common/drawable/ic_material_star.xml
new file mode 100644
index 0000000..cd7c61c
--- /dev/null
+++ b/res-common/drawable/ic_material_star.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+
+<!-- Material design star icon -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+<path
+ android:fillColor="#000000"
+ android:pathData="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
+</vector>
\ No newline at end of file
diff --git a/res-common/values/colors.xml b/res-common/values/colors.xml
index b555bff..7840058 100644
--- a/res-common/values/colors.xml
+++ b/res-common/values/colors.xml
@@ -183,4 +183,6 @@
<!-- Color of account/custom filters -->
<color name="account_filter_text_color">@color/actionbar_text_color_black</color>
<color name="custom_filter_divider">#dbdbdb</color>
+
+ <color name="material_star_pink">#f50057</color>
</resources>
diff --git a/res-common/values/dimens.xml b/res-common/values/dimens.xml
index 8acd801..fe33300 100644
--- a/res-common/values/dimens.xml
+++ b/res-common/values/dimens.xml
@@ -85,7 +85,7 @@
<dimen name="contact_browser_list_item_text_size">16sp</dimen>
<dimen name="contact_browser_list_item_photo_size">40dp</dimen>
<dimen name="contact_browser_list_item_gap_between_image_and_text">15dp</dimen>
- <dimen name="contact_browser_list_item_gap_between_indexer_and_image">6dp</dimen>
+ <dimen name="contact_browser_list_item_gap_between_indexer_and_image">20dp</dimen>
<dimen name="contact_browser_list_top_margin">12dp</dimen>
<!-- Dimensions for "No contacts" string in PhoneFavoriteFragment for the All contacts
diff --git a/res-common/values/styles.xml b/res-common/values/styles.xml
index 168816a..ead4221 100644
--- a/res-common/values/styles.xml
+++ b/res-common/values/styles.xml
@@ -21,7 +21,7 @@
</style>
<style name="SectionHeaderStyle" parent="@android:style/TextAppearance.Large">
- <item name="android:textSize">18sp</item>
+ <item name="android:textSize">16sp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">@color/section_header_text_color</item>
<item name="android:textStyle">bold</item>