In the Android development will often need to use a button with text and pictures, below to introduce the use of RadioButton to achieve picture and text layout or left and right. The code is very simple will not give us more explanation.
The layout file is simple enough to show how RadioButton is used.
<?xml version= "." Encoding= "utf-"?> <relativelayout xmlns:android=
"http://schemas.android.com/apk/ Res/android "
android:layout_width=" match_parent "
android:layout_height=" match_parent "
android:o" rientation= "vertical" >
<radiobutton
android:layout_width= "wrap_content"
android:layout_ height= "Wrap_content"
android:layout_centerinparent= "true"
android:button= "@null"
android: drawabletop= "@drawable/ic_launcher"
android:text= "Test button"/>
</RelativeLayout>
The effect chart is as follows
The above code I did not write a note, I believe we can see that the above code has any questions welcome to my message, I will be in the first time and you contact. Thank you.