Is it possible to make Radio Buttons in Android, where there are image representation to a button instead of a regular buttons? I want it to look something like that:
The cyan in the middle represents the selected button.
How can I do it?
Is it possible to make Radio Buttons in Android, where there are image representation to a button instead of a regular buttons? I want it to look something like that:
The cyan in the middle represents the selected button.
How can I do it?
The RadioButton
class has a buttonDrawable
member, derived from CompoundButton
.
There are multiple ways you can change this drawable.
From java:
myRadioButton.setButtonDrawable(resourceId or Drawable);
From xml:
<RadioButton
android:button="@drawable/yourdrawable"
...
/>
If you just want the checked/unchecked state look differently, then
© 2022 - 2024 — McMap. All rights reserved.