我使用水平线性布局的文本标签和单选按钮组:的Android垂直对齐文本和Widget
如何设置它,这样标签(性别)出现在广播组的垂直中心?目前,它似乎太高
的代码为我的布局的这一部分是:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:text="Sex:" />
<RadioGroup
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Male"
android:id="@+id/input_button_male"
android:paddingRight="10dp"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female"
android:id="@+id/input_button_female"
android:paddingRight="10dp"/>
</RadioGroup>
</LinearLayout>
哎@Simon的hve你试过这种??? –