我已经定制了我的应用程序中的所有radioButton,但listPreference中的radioButtons没有得到定制。如何自定义列表首选项单选按钮
我已经使用这个XML命名btn_radio.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/radio_selected" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/radio_unselected" />
<item android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/radio_selected" />
<item android:state_checked="false" android:state_pressed="true"
android:drawable="@drawable/radio_unselected" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/radio_selected" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/radio_unselected" />
<item android:state_checked="false" android:drawable="@drawable/radio_unselected" />
<item android:state_checked="true" android:drawable="@drawable/radio_selected" />
</selector>
这是延伸在我的应用程序的主题Android的定制单选按钮
<style name="CustomRadioButton" Parent="@android:style/Widget.CompoundButton.RadioButton">
<item name="android:button">@drawable/btn_radio</item>
</style>
的customRadioButton我已经这样做了改变
<item name="android:radioButtonStyle">@style/CustomRadioButton</item>
<item name="android:listChoiceIndicatorSingle">@style/CustomRadioButton</item>
这改变了customiz e除我的应用程序中的radioButton之外的所有radioButtons
PLZ答案我在等 –