Rof*_*ion 180
这应该可以通过使用weightSum和layout_weight来实现:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:weightSum="1.0">
<Button
android:id="@+id/textbox3"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:layout_width="0dip"
android:textSize="12sp" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)