我正在尝试更改sherlock操作栏的下拉背景及其文本颜色。这是我尝试过的:
<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>
主题为MyTheme
,使用以下代码我得到了理想的背景颜色,但我在下拉导航中无法获得文本的颜色。有人可以帮忙。
答案 0 :(得分:0)
把那段代码
<item name="android:textColor">#ffffffff</item>
进入MyTheme代码应该像:
<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>