开发者

How can I change the circle picture of a radio button in both cases checked and unchecked?

开发者 https://www.devze.com 2023-04-09 00:11 出处:网络
I want to customize the radio buttons so instead of being like this \"empty circle in case unchecked and 开发者_JS百科green on in case checked\"

I want to customize the radio buttons so instead of being like this "empty circle in case unchecked and 开发者_JS百科green on in case checked"

How can I change the circle picture of a radio button in both cases checked and unchecked?

I want to make the picture in case it's unchecked like this

How can I change the circle picture of a radio button in both cases checked and unchecked?

and in case it's checked like this

How can I change the circle picture of a radio button in both cases checked and unchecked?

How can I achieve that by xml or java??


Use a state list to define different drawables for different Button states.

Here is an example: Is it possible to change the radio button icon in an android radio button group


Use state list drawables. There's a tutorial on them here.

0

精彩评论

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

关注公众号