android - Changing the background color of searchview autocomplete dropdown -


i have searchview content provider custom suggestions, displayed in dropdown. however, dropdown background dark while text black it's not visible. app theme inheriting theme.appcompat.light else in app black text on light background.

enter image description here

i want change background of dropdown text readable haven't found way of doing so. closest got following solution here: style android searchview drop down popup when dropdown appears, stuff looks messed up.

enter image description here

is there working solution this?

applying styles can change dropdown background color , items text color , size

<!-- toolbar --> <style name="toolbarstyle" parent="theme.appcompat">     <item name="android:textcolorprimary">@android:color/white</item>     <item name="android:textcolorsecondary">@android:color/white</item>     <item name="actionmenutextcolor">@android:color/white</item>     <item name="android:dropdownitemstyle">@style/mydropdownitemstyle</item>     <item name="android:dropdownlistviewstyle">@style/mydropdownlistviewstyle</item> </style>   <style name="mydropdownitemstyle" parent="widget.appcompat.dropdownitem.spinner">     <item name="android:textcolor">@color/secondary_text_default_material_light</item>     <item name="android:textsize">14dp</item> </style>  <style name="mydropdownlistviewstyle" parent="widget.appcompat.listview.dropdown">     <item name="android:background">#fff</item> </style> 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -