Android 自定义单选按钮不显示文本
我已经从实现了CustomRadioButton 这里,为设置CustomRadioButton实现了主题,然后将该主题添加到活动中 我已经完成了大部分步骤,效果很好。但我想在那个单选按钮上加上文字那就不可能了Android 自定义单选按钮不显示文本,android,radio-button,android-widget,Android,Radio Button,Android Widget,我已经从实现了CustomRadioButton 这里,为设置CustomRadioButton实现了主题,然后将该主题添加到活动中 我已经完成了大部分步骤,效果很好。但我想在那个单选按钮上加上文字那就不可能了 为什么我无法设置单选按钮的文本?可能是您的宽度或颜色。你的单选按钮是这样的吗 <RadioButton android:id="@+id/type_pounds" android:layout_width="wrap_content" android:lay
为什么我无法设置单选按钮的文本?可能是您的宽度或颜色。你的单选按钮是这样的吗
<RadioButton
android:id="@+id/type_pounds"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pounds"
android:textColor="#000000" />
您使用的是xml标签吗?android:text=“text”?我使用过它,但仍然没有得到文本。我做了与链接中解释的相同的事情。没有任何额外的代码。