我想将这些输入对齐,使其右侧有两个自动完成框,右侧有一个较小的按钮。但是,我最终得到了一个涵盖所有内容的大型自动完成功能(第二个)。
<RelativeLayout
android:layout_alignParentBottom="true"
android:id="@+id/transport_search"
android:background="@color/dark_grey"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
<AutoCompleteTextView
android:id="@+id/transport_autoCompleteFrom"
android:layout_width="fill_parent"
android:layout_weight="5"
></AutoCompleteTextView>
<Button
android:id="@+id/transport_switchDirection"
android:layout_toRightOf="@+id/transport_autoCompleteFrom"
android:layout_width="fill_parent"
android:layout_weight="1"
></Button>
<AutoCompleteTextView
android:id="@+id/transport_autoCompleteTo"
android:layout_width="fill_parent"
android:layout_weight="5"
></AutoCompleteTextView>
<Button
android:id="@+id/transport_go"
android:layout_toRightOf="@+id/transport_autoCompleteTo"
android:layout_width="fill_parent"
android:layout_weight="1"
></Button>
</RelativeLayout>
我究竟做错了什么?