我正在操作栏中使用搜索窗口小部件。默认情况下,建议对话框在背景中为黑色,文本和查询优化图标为白色。我将对话框的背景更改为白色,并将建议文本颜色更改为黑色。但是我无法找到如何将查询细化按钮的颜色更改为黑色,以使其在白色对话框中可见。
Styles.xml
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="actionMenuTextAppearance">@style/MenuItemTextAppearance</item>
<item name="android:autoCompleteTextViewStyle">@style/myAutoCompleteTextViewStyle
</item>
<item name="android:textAppearanceSearchResultTitle">@style/mySearchResult</item>
</style>
<style name="myAutoCompleteTextViewStyle" parent="Widget.AppCompat.Light.AutoCompleteTextView">
<item name="android:popupBackground">#FFF</item>
</style>
<style name="mySearchResult" parent="TextAppearance.AppCompat.SearchResult.Title">
<item name="android:textColor">#000</item>
</style>
<style name="MenuItemTextAppearance" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Menu">
<item name="textAllCaps">false</item>
<item name="android:textSize">15sp</item>
</style>
<style name="Divider">
<item name="android:background">@android:color/background_dark</item> //you can give your color here. that will change all divider color in your app.
</style>
<style name="Divider.Horizontal" parent="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item> // You can change thickness here.
</style>