有什么办法可以改变单选按钮的颜色? [英] Any way to change the color of a radio button?

查看:15
本文介绍了有什么办法可以改变单选按钮的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个包含一组单选按钮的单选组的 android 表单.据我所知,当您选择单选按钮时,无法设置单选按钮突出显示的颜色.它似乎总是默认为一些亮绿色.这是可编辑的还是不可编辑的?

I'm working on an android form with a radio group containing a set of radio buttons. From what I can tell there is no way to set the color a radio button highlights when you select it. It seems to always default to some bright green color. Is this something that is editable or no?

谢谢

推荐答案

是的,您可以创建自己的可绘制对象,使其在选中时看起来像您想要的样子,并使用 android:button 将其设置为资源.

Yes you can create your own drawable for what you want it to look like when checked and use android:button to set it to the resource.

此处示例

这篇关于有什么办法可以改变单选按钮的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆