0

I want to customize the radio buttons so instead of being like this "empty circle in case unchecked and green on in case checked" enter image description here

I want to make the picture in case it's unchecked like this enter image description here

and in case it's checked like this enter image description here

How can I achieve that by xml or java??

Sonnenschein
  • 169
  • 7
  • 21

2 Answers2

2

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

Community
  • 1
  • 1
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
0

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

Mark Allison
  • 21,839
  • 8
  • 47
  • 46