我有一个应用程序,其中底部并排有两个按钮(在RelativeLayout 内的TableLayout 中)。这在小屏幕上看起来不错,但在大屏幕上,底部会留下难看的黑色空间。我想垂直扩展按钮以填充空间,但不知道如何!
我已经包含了下面的代码(为简单起见,删除了 RelativeLayout 的内容;下面的行为与它的版本完全相同)
<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableRow android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:layout_width="wrap_content" android:id="@+id/Button01" android:text="@string/Button01" android:layout_weight="50" android:layout_height="fill_parent"></Button>
<Button android:layout_width="wrap_content" android:id="@+id/Button02" android:text="@string/Button02" android:layout_weight="50" android:layout_height="fill_parent"></Button>
</TableRow>
</TableLayout>
</RelativeLayout>
任何人都知道如何在当前布局中拉伸按钮,或者让我更容易做到这一点的不同布局?
谢谢,