开发者

Adding style to ActionBar drop down spinner makes it not a drop down

开发者 https://www.devze.com 2023-04-01 10:13 出处:网络
I\'m using this tutorial: http://android-developers.blogspot.com/2011/04/customizing-action-bar.html I set a drop down list theme like this

I'm using this tutorial:

http://android-developers.blogspot.com/2011/04/customizing-action-bar.html

I set a drop down list theme like this

<!-- style the list navigation -->
<style name="MyDropDownNav" parent="android:style/Widget.Holo.Light.Spinner.DropDown.ActionBar">
    <item name="android:textColor">#ffffff</item>
</style>

and now pressing the spinner causes it to show up centered on the screen instead of as a drop down. Has anyone run into this? I'm using exactly what they said in the example. Even if I remov开发者_Python百科e the text color and just have the empty style that is based on the parent, the spinner appears in the middle of the screen. Has anyone discovered a way to fix this?

Edit: One more thing I forgot to mention, the style does not even update the text to be white.


Found the solution, the parent is incorrect in the example. It should be:

parent="android:style/Widget.Holo.Light.Spinner"
0

精彩评论

暂无评论...
验证码 换一张
取 消