Android layout 编辑文本和按钮布局

Android layout 编辑文本和按钮布局,android-layout,Android Layout,我想有一个EditText(尽可能宽)和它旁边的一个按钮。 EditText(填充父项-按钮宽度)+按钮(包裹内容)=全部(填充父项) 我该怎么做… <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:layout_width="0dip" android:layout_height="wrap_content"

我想有一个EditText(尽可能宽)和它旁边的一个按钮。 EditText(填充父项-按钮宽度)+按钮(包裹内容)=全部(填充父项)

我该怎么做…


<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
    <EditText android:layout_width="0dip" android:layout_height="wrap_content"
        android:layout_weight="1.0"/>
    <Button android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:text="Button"/>
</LinearLayout>
这应该行得通