删除边框单选按钮?

Remove border RadioButton?

我可以删除 RadioButton 的边框并且我有 RadioButtons 如下所示:

我看到了很多问题,我使用了 android:buttonTint=""style ......但是没有用。

您无法使用单选按钮将其删除。 你可以做的是将它设置为与你的背景相同的颜色, 或创建自定义单选按钮 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>

在您的布局中使用 XML:

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

有关自定义的更多信息和示例 xml: Adding custom radio buttons in android

remove default radio button checkbox when using a custom selector

另一种选择是使用切换而不是单选按钮,并且只需更改可绘制的 onToggle。

不,您不能删除 this.You 可以自定义单选按钮。

您需要创建一个自定义单选按钮才能以这种方式更改样式。如果您想了解如何操作,请阅读此 article。祝你好运。