0

Hello i'm overriding SearchView attributes with values from the LightTheme:

<style name="LightSearchView" parent="@android:style/Theme.NoTitleBar.Fullscreen">
 <!-- SearchView attributes -->
    <item name="android:searchDropdownBackground">@android:drawable/search_dropdown_light</item>
    <item name="android:searchViewTextField">@drawable/textfield_searchview_holo_light</item>
    <item name="android:searchViewTextFieldRight">@drawable/textfield_searchview_right_holo_light</item>
    <item name="android:searchViewCloseIcon">@android:drawable/ic_clear_holo_light</item>
    <item name="android:searchViewSearchIcon">@android:drawable/ic_search_api_holo_light</item>
    <item name="android:searchViewGoIcon">@android:drawable/ic_go_search_api_holo_light</item>
    <item name="android:searchViewVoiceIcon">@android:drawable/ic_voice_search_api_holo_light</item>
    <item name="android:searchViewEditQuery">@android:drawable/ic_commit_search_api_holo_light</item>
</style>

But the error: res\values\styles.xml:26: error: Error: No resource found that matches the given name: attr 'android:searchDropdownBackground'

Appears for all the items.

How do I override then (for API 13+).

Also, it's a notice that on appcompat-v21 they exposed those fields to be overrideable, but I did downloaded appcompat src and added as a Android Library Project but overriding the values dont change the SearchView.

Marcos Vasconcelos
  • 18,136
  • 30
  • 106
  • 167
  • possible duplicate of [Changing the background drawable of the searchview widget](http://stackoverflow.com/questions/11085308/changing-the-background-drawable-of-the-searchview-widget) – tachyonflux Jun 05 '15 at 22:27

1 Answers1

0

You can´t set android:searchDropdownBackground and other field style using the theme NoTitleBar or any other themes

read this: Changing the background drawable of the searchview widget

Community
  • 1
  • 1
Jorgesys
  • 124,308
  • 23
  • 334
  • 268