Asset swap and make SearchView use themed context

- Make SearchView in action bar in People app use action bar
themed context so the query text and icons are white instead
of gray. Create a custom theme to make the hint text lighter
than the default DarkActionBar hint text color (as directed
by UX and framework)

- Replace panel_message asset (background of contact editor on
tablet and contact unavailable fragment)

- Replace the panel_content asset (background of group detail
fragment)

Bug: 5127109
Bug: 5199518
Change-Id: Icae927e1d158241140d18028d38cac25dbf282fc
diff --git a/res/drawable-hdpi/panel_content.9.png b/res/drawable-hdpi/panel_content.9.png
index 8c412ed..5c3090d 100644
--- a/res/drawable-hdpi/panel_content.9.png
+++ b/res/drawable-hdpi/panel_content.9.png
Binary files differ
diff --git a/res/drawable-hdpi/panel_message.9.png b/res/drawable-hdpi/panel_message.9.png
index 796a8fa..caa3f60 100644
--- a/res/drawable-hdpi/panel_message.9.png
+++ b/res/drawable-hdpi/panel_message.9.png
Binary files differ
diff --git a/res/drawable-mdpi/panel_content.9.png b/res/drawable-mdpi/panel_content.9.png
index 12604ad..c5d2545 100644
--- a/res/drawable-mdpi/panel_content.9.png
+++ b/res/drawable-mdpi/panel_content.9.png
Binary files differ
diff --git a/res/drawable-mdpi/panel_message.9.png b/res/drawable-mdpi/panel_message.9.png
index 529c61d..de74565 100644
--- a/res/drawable-mdpi/panel_message.9.png
+++ b/res/drawable-mdpi/panel_message.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/panel_content.9.png b/res/drawable-xhdpi/panel_content.9.png
index e0b20de..6acbbb1 100644
--- a/res/drawable-xhdpi/panel_content.9.png
+++ b/res/drawable-xhdpi/panel_content.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/panel_message.9.png b/res/drawable-xhdpi/panel_message.9.png
index ce3c06d..30a7bc3 100644
--- a/res/drawable-xhdpi/panel_message.9.png
+++ b/res/drawable-xhdpi/panel_message.9.png
Binary files differ
diff --git a/res/values-sw580dp-w720dp/styles.xml b/res/values-sw580dp-w720dp/styles.xml
index 69548c5..1bda6aa 100644
--- a/res/values-sw580dp-w720dp/styles.xml
+++ b/res/values-sw580dp-w720dp/styles.xml
@@ -16,6 +16,7 @@
 <resources>
     <style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+        <item name="android:actionBarWidgetTheme">@style/ContactsActionBarTheme</item>
         <item name="android:actionBarItemBackground">@drawable/action_bar_item_background</item>
         <item name="android:actionBarTabStyle">@style/ContactsActionBarTabView</item>
         <item name="android:textColorPrimary">@color/primary_text_color</item>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index 0a62db2..62c0efb 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -16,6 +16,7 @@
 <resources>
     <style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+        <item name="android:actionBarWidgetTheme">@style/ContactsActionBarTheme</item>
         <item name="android:actionBarItemBackground">@drawable/action_bar_item_background</item>
         <item name="android:actionBarTabStyle">@style/ContactsActionBarTabView</item>
         <item name="android:textColorPrimary">@color/primary_text_color</item>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 03a9134..aa00071 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -128,6 +128,7 @@
     <style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
         <item name="android:actionBarItemBackground">@drawable/action_bar_item_background</item>
+        <item name="android:actionBarWidgetTheme">@style/ContactsActionBarTheme</item>
         <item name="android:actionBarTabStyle">@style/ContactsActionBarTabView</item>
         <item name="android:textColorPrimary">@color/primary_text_color</item>
         <item name="android:textColorSecondary">@color/secondary_text_color</item>
@@ -171,6 +172,10 @@
         <item name="android:displayOptions"></item>
     </style>
 
+    <style name="ContactsActionBarTheme" parent="@android:style/Theme.Holo">
+        <item name="android:textColorHint">#CCCCCC</item>
+    </style>
+
     <style name="ContactsActionBarTabView" parent="@android:style/Widget.Holo.ActionBar.TabView">
         <item name="android:background">@drawable/action_bar_tab</item>
     </style>
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 09f4f1c..edf5519 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -107,8 +107,8 @@
         mShowHomeIcon = mContext.getResources().getBoolean(R.bool.show_home_icon);
 
         // Set up search view.
-        View customSearchView = LayoutInflater.from(mContext).inflate(R.layout.custom_action_bar,
-                null);
+        View customSearchView = LayoutInflater.from(mActionBar.getThemedContext()).inflate(
+                R.layout.custom_action_bar, null);
         int searchViewWidth = mContext.getResources().getDimensionPixelSize(
                 R.dimen.search_view_width);
         if (searchViewWidth == 0) {