<RadioGroup
android:id="@+id/tab_rg_group"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RadioButton
android:id="@+id/textView2"
style="@style/TextView_AllOrders"
android:layout_width="fill_parent"
android:button="@null"
android:checked="true"
android:text="帐户信息" />
<RadioButton
android:id="@+id/textView4"
style="@style/TextView_AllOrders"
android:layout_width="fill_parent"
android:button="@null"
android:text="我要充值" />
<RadioButton
android:id="@+id/textView3"
style="@style/TextView_AllOrders"
android:layout_width="fill_parent"
android:button="@null"
android:text="充值记录" />
<RadioButton
android:id="@+id/textView1"
style="@style/TextView_AllOrders"
android:layout_width="fill_parent"
android:button="@null"
android:text="交易详情" />
</RadioGroup>
sytle
<style name="TextView_AllOrders">
<item name="android:layout_height">40dip</item>
<item name="android:layout_marginTop">15dip</item>
<item name="android:background">@drawable/aijia_customcheckbutton</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">15dip</item>
<item name="android:padding">10dip</item>
<item name="android:layout_marginLeft">10dip</item>
<item name="android:layout_marginRight">10dip</item>
</style>
然后是background
<?xml version="1.0" encoding="UTF-8"?>
<!-- #EFEFF1 -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"><shape>
<gradient android:angle="270" android:endColor="#AA99cc44" android:startColor="#AA99cc44" />
<stroke android:width="1dp" android:color="#AA99cc44" />
<padding android:bottom="10dp" android:left="5dp" android:right="5dp" android:top="10dp" />
</shape></item>
<item android:state_checked="true"><shape>
<gradient android:angle="270" android:endColor="#AA99cc44" android:startColor="#AA99cc44" />
<stroke android:width="5dp" android:color="#FF99cc44" />
<padding android:bottom="10dp" android:left="5dp" android:right="5dp" android:top="10dp" />
</shape></item>
<item><shape>
<gradient android:angle="270" android:endColor="#EFEFF1" android:startColor="#EFEFF1" />
<stroke android:width="2dp" android:color="#EFEFF1" />
<padding android:bottom="10dp" android:left="5dp" android:right="5dp" android:top="10dp" />
</shape></item>
</selector>
android:button="@null"这个是去掉圆圈用的