Contacts: style fast scroll thumb like in Dialer
Change-Id: I1306e14fd6bc033019cbc8b563c1d4b6e6824731
diff --git a/res/drawable/thumb.xml b/res/drawable/thumb.xml
new file mode 100644
index 0000000..f0962cd
--- /dev/null
+++ b/res/drawable/thumb.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 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.
+ -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <corners
+ android:topLeftRadius="8dp"
+ android:topRightRadius="8dp"
+ android:bottomLeftRadius="8dp"
+ android:bottomRightRadius="8dp"/>
+ <size android:height="48dp" android:width="8dp"/>
+ <solid android:color="@color/primary_color" />
+
+</shape>
diff --git a/res/drawable/thumb_default.xml b/res/drawable/thumb_default.xml
new file mode 100644
index 0000000..4ab2445
--- /dev/null
+++ b/res/drawable/thumb_default.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 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.
+ -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <corners
+ android:topLeftRadius="8dp"
+ android:topRightRadius="8dp"
+ android:bottomLeftRadius="8dp"
+ android:bottomRightRadius="8dp"/>
+ <size android:height="48dp" android:width="8dp"/>
+ <solid android:color="@color/secondary_text_color" />
+</shape>
diff --git a/res/drawable/thumb_drawable.xml b/res/drawable/thumb_drawable.xml
new file mode 100644
index 0000000..530dd4a
--- /dev/null
+++ b/res/drawable/thumb_drawable.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2017 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_pressed="true"
+ android:drawable="@drawable/thumb"/>
+
+ <item
+ android:drawable="@drawable/thumb_default"/>
+</selector>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index ee0f443..5467780 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -99,7 +99,7 @@
<color name="secondary_text_color">@color/dialtacts_secondary_text_color</color>
<!-- Text color for section header. -->
- <color name="section_header_text_color">@color/dialtacts_theme_color</color>
+ <color name="section_header_text_color">@color/primary_text_color</color>
<!-- Color of the theme of the People app -->
<color name="people_app_theme_color">#363636</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8864f9b..289e243 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -168,6 +168,10 @@
<item name="android:popupMenuStyle">@style/PopupMenuStyleAppCompat</item>
<item name="popupMenuStyle">@style/PopupMenuStyleAppCompat</item>
<item name="android:contextPopupMenuStyle">@style/PopupMenuStyleAppCompat</item>
+
+ <item name="android:fastScrollThumbDrawable">@drawable/thumb_drawable</item>
+ <item name="android:fastScrollTrackDrawable">@null</item>
+ <item name="android:fastScrollTextColor">@android:color/white</item>
</style>
<style name="PopupMenuStyle" parent="@android:style/Widget.PopupMenu">