0

Can I remove border of RadioButton and I have RadioButtons like bellow :

enter image description here

I see a lot of question and I used from android:buttonTint="" and style ... but don't work .

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

3 Answers3

1

You can't remove that using the radiobutton. what you can do is set it to the same color as your background, or create a custom radiobutton XML:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_checked="false" 
android:drawable="@drawable/your_radio_off_image_name" />
<item android:state_checked="true" 
android:drawable="@drawable/your_radio_on_image_name" />
</selector>

use that XML in your layout:

<RadioButton
android:id="@+id/radiobutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/custom_radiobutton"/>

more info and examples about custom xml: Adding custom radio buttons in android

remove default radio button checkbox when using a custom selector

Another option is to use a toggle instead of radiobutton, and just change the drawable onToggle.

washichi
  • 100
  • 3
  • 15
0

No, you can't remove this.You can custom radio button.

Dinal Koyani
  • 455
  • 3
  • 6
0

You will need to create a custom radio button to change the style in that way. Read this article if you want to learn how to do it. Good luck.

gbruscatto
  • 686
  • 7
  • 21