开发者

Android RadioButton display

开发者 https://www.devze.com 2023-02-13 06:31 出处:网络
This question has been posted before last year but the answers were not helpful to me. Is there a way to make the RadioButton double-circle with green center to indicate selection not display? I want

This question has been posted before last year but the answers were not helpful to me.

Is there a way to make the RadioButton double-circle with green center to indicate selection not display? I want the user to just see a background image, inst开发者_如何学编程ead of that image with the circle button over it. Thank you very much.


Call setButtonDrawable() on the RadioButton to be whatever you want. For it to work, it will need to be a StateListDrawable with all of the appropriate states. You can see the existing drawable resource -- it is btn_radio.xml in your Android SDK installation. Copy that into your project, copy the PNGs for the states into your project, adjust the PNGs to be whatever you want, and call setButtonDrawable() to reference your customized StateListDrawable resource. From the XML, this can be done using the android:button property.

0

精彩评论

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

关注公众号