split two controls in Relativelayout
This address: Http://blog.csdn.net/caroline_wendy
Relativelayout in the split, you need to use a benchmark, which is to place a reference in the middle, one on the left and one on the right; the width of the left side is set to Android:layout_ Width= "0DP", automatically filled according to content;
Such as:
<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "match_parent "Android:layout_height=" match_parent "android:orientation=" vertical "> <view android:id=" @+id/eton_p Laceholder "android:layout_width=" 0DP "android:layout_height=" 0DP "android:layout_centerhorizontal=" t Rue "/> <textview android:id=" @+id/eton_cardio_face_entry_text_view "android:layout_width=" 0DP " android:layout_height= "Wrap_content" android:layout_alignparentleft= "true" android:layout_below= "@id/eton _chunyu_doctor_entry_text_view "android:layout_toleftof=" @id/eton_placeholder "android:background=" @color/pi NK "android:gravity=" center "android:text=" heart rate Monitor "android:textsize=" 36DP "/> <textview Android:id= "@+id/eton_pedometer_entry_text_view" android:layout_width= "0DP" android:layout_height= "Wrap_cont Ent "Android:layout_aLignparentright= "true" android:layout_below= "@id/eton_chunyu_doctor_entry_text_view" Android:layout_torighto f= "@id/eton_placeholder" android:background= "@color/orange" android:gravity= "center" android:text= "pedometer "Android:textsize=" 36DP "/></relativelayout>
Android-Split two controls in Relativelayout