自定義RadioButton樣式分為兩步:
1、自定義好樣式:
?打開style.xml,添加壹個item
<style?name="RadiobuttonStyle"><item?name="android:gravity">center</item>
<item?name="android:textSize">16sp</item>
<item?name="android:textColor">@color/text_select_color</item>
<item?name="android:button">@null</item>
<item?name="android:drawableTop">@drawable/select_rbtn_home</item>
</style>
2、在RadioButon中引用:
<RadioButtonandroid:id="@+id/tv_tab_home"
style="@style/RadiobuttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/tab_home"?/>