I am trying to change the drop down background of the sherlock action bar as well as its text color. Here's what I have tried:
<style name="DropDown" parent="Widget.Sherlock.Spinner.DropDown.ActionBar">
<item name="android:popupBackground">#EDEDED</item>
</style>
<style name="TextAppearance" parent="TextAppearance.Sherlock.Widget.TextView.SpinnerItem">
<item name="android:textColor">#A9A9A9</item>
</style>
<style name="SpinnerItemStyle" parent="Widget.Sherlock.TextView.SpinnerItem">
<item name="android:textAppearance">@style/TextAppearance</item>
</style>
<style name="MyTheme" parent="@style/devcheckStyle">
<item name="android:actionDropDownStyle">@style/DropDown</item>
<item name="actionDropDownStyle">@style/DropDown</item>
<item name="spinnerItemStyle">@style/SpinnerItemStyle</item>
<item name="android:spinnerItemStyle">@style/SpinnerItemStyle</item>
</style>
The main theme being MyTheme
, with the following code I am getting the desirable background color, but I am getting nowhere with the text's color inside the drop down navigation. Can someone please help.
Put that code
<item name="android:textColor">#ffffffff</item>
into your MyTheme code should be like:
<style name="MyTheme" parent="@style/devcheckStyle">
<item name="android:actionDropDownStyle">@style/DropDown</item>
<item name="actionDropDownStyle">@style/DropDown</item>
<item name="spinnerItemStyle">@style/SpinnerItemStyle</item>
<item name="android:spinnerItemStyle">@style/SpinnerItemStyle</item>
</style>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.