<?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/tabswitcher_long" /> <item android:state_checked="true" android:drawable="@drawable/tabswitcher_short" /> </selector>
<RadioGroup android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <RadioButton android:id="@+id/btn_0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="最新信息" android:textSize="17.0sp" android:textColor="@android:color/black" android:gravity="center" android:layout_weight="1" android:checked="true" android:button="@null" android:background="@drawable/radio" /> <RadioButton android:id="@+id/btn_1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="在线专家" android:textSize="17.0sp" android:textColor="@android:color/black" android:gravity="center" android:layout_weight="1" android:button="@null" android:background="@drawable/radio" /> <RadioButton android:id="@+id/btn_2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="预约服务" android:textSize="17.0sp" android:textColor="@android:color/black" android:gravity="center" android:layout_weight="1" android:button="@null" android:background="@drawable/radio" /> </RadioGroup>
转:android 自定义RadioButton样式,布布扣,bubuko.com
原文:http://www.cnblogs.com/s12s12c12/p/3923919.html