4
我有两个彼此相邻的按钮。我希望它们具有相同的尺寸并填充屏幕的整个宽度。我一直在试图与此代码: (它的RelativeLayout的,如果该事项)Android对齐两个按钮
<Button android:text="Names"
android:id="@+id/Button01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
<Button android:text="Dates"
android:id="@+id/Button02"
android:layout_toRightOf="@+id/Button01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
这是一个美丽的解决方案。完全按照需要工作。 – jbranchaud 2011-03-18 02:27:01