Android 更改微调器按下颜色 Light Holo 主题
我正在开发 Android 平板电脑应用程序。我创建了一个自定义操作栏,并设法按照我想要的方式设置其样式,除了旋转器之外。
我的主题扩展了 Holo Light,这意味着当我按下旋转器时,它会变成蓝色。我该如何改变这个?
I am working on an Android Tablet app. I have created a custom action bar, and managed to style it the way I want, except for the spinners.
My main theme extends Holo Light meaning that when I press a spinner it goes blue. How do I change this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在主题中为
android:actionDropDownStyle
指定自定义样式,该样式本身具有用于自定义状态列表可绘制对象的android:background
。以下是默认指定的图像:
您需要为其中每一种状态(以及 mdpi、hdpi 和 xhdpi)提供自己的图像。
您可以修改平台附带的内容,让您的生活更轻松。查看
SDK/platforms/platform-14/data/res/
中的drawable-mdpi
、drawable-hdpi
和drawable -xhdpi 文件夹。
Specify a custom style for
android:actionDropDownStyle
in your theme which itself has anandroid:background
for your custom state-list drawable.Here's the one that's specified by default:
You'll need to provide your own images for each one of these states (and for mdpi, hdpi, and xhdpi).
You can modify the ones that come with the platform to make your life easier. Look in
SDK/platforms/platform-14/data/res/
in thedrawable-mdpi
,drawable-hdpi
, anddrawable-xhdpi
folders.