我有两个并排的按钮。我希望它们大小相同并填满整个屏幕宽度。我一直在尝试以下代码:(如果这很重要,它是相对布局)
<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>