【发布时间】:2011-06-22 00:00:23
【问题描述】:
我有两个相邻的按钮。我希望它们具有相同的大小并填充屏幕的整个宽度。我一直在尝试使用此代码: (如果重要的话,这是相对布局)
<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>
【问题讨论】: