时间:2010-07-25 04:14:03

标签: android

2 个答案:

答案 0 :(得分:3)

用于右侧对齐的单选按钮:

<RadioButton
                    android:id="@+id/radio0"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:background="@null"
                    android:button="@null"
                    android:checked="true"
                    android:drawableRight="@drawable/presets_sel"
                    android:padding="12dp"
                    android:text="RadioButton 1" />
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/right_arrow_h" android:state_checked="true"/>
    <item android:drawable="@drawable/right_arrow_h" android:state_pressed="true"/>
    <item android:drawable="@drawable/right_arrow"></item>

</selector>

答案 1 :(得分:0)

我做了一个非常详细的回答here。这个问题经常出现,我需要仔细格式化RadioButtons!

祝你好运!

相关问题