繁体   English   中英

单选按钮使单选按钮外圈的颜色与选择单选按钮时的颜色不同

[英]radio button make radio button outer circle a different colour to the colour when the radio button is selected

我需要在Android中自定义单选按钮的帮助。 基本上我想做的是将单选按钮设置为白色,并且当用户单击或选择单选按钮时,我希望内圈为蓝色,外圈为白色。
我知道我可以使用buttonTint,但是当用户选择单选按钮为相同颜色时,这将同时设置外圆和内圆。
我想做什么甚至可能?

谢谢

在此处输入图片说明

使用RadioButton buttonTint属性:

<RadioButton
    android:id="@+id/radio_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:checked="true"
    android:buttonTint="OUTER_CIRCLE_COLOR_CODE"/>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM