OSDN Git Service

Fix SearchView background too high
authorAga Wronska <agawronska@google.com>
Fri, 26 Feb 2016 00:32:49 +0000 (16:32 -0800)
committerAga Wronska <agawronska@google.com>
Fri, 26 Feb 2016 01:19:17 +0000 (17:19 -0800)
Bug: 27293462
Change-Id: Id694fc9c1a7d6e21534e74e20f95c8c080861598

packages/DocumentsUI/res/values/styles.xml
packages/DocumentsUI/src/com/android/documentsui/SearchViewManager.java

index f4dfd73..21bdfd9 100644 (file)
@@ -29,6 +29,7 @@
         <item name="android:colorPrimary">@color/primary</item>
         <item name="android:colorAccent">@color/accent</item>
         <item name="colorActionMode">@color/action_mode</item>
+        <item name="android:queryBackground">@color/menu_search_background</item>
 
         <item name="android:listDivider">@*android:drawable/list_divider_material</item>
 
index 0496862..8beb245 100644 (file)
@@ -145,8 +145,6 @@ final class SearchViewManager implements
 
     private void onSearchExpanded() {
         mSearchExpanded = true;
-        mView.setBackgroundColor(
-                mView.getResources().getColor(R.color.menu_search_background, null));
     }
 
     boolean isSearching() {
@@ -179,9 +177,6 @@ final class SearchViewManager implements
             return false;
         }
 
-        mView.setBackgroundColor(
-                mView.getResources().getColor(android.R.color.transparent, null));
-
         // Refresh the directory if a search was done
         if (mCurrentSearch != null) {
             mCurrentSearch = null;