Given a horizontal LinearLayout in Android, I'd like to create:
(1) a textbox which fills nearly the width of the screen, except leaving enough space for...
(2) a button on the right
So I create an EditText and a Button and they're both very small.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<EditText android:text=""
android:id="@+id/Text01"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
</EditText>
<Button android:text="+"
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right">
</Button>
</LinearLayout>
I can't set the EditText to android:layout_width="fill_parent" otherwise it would obliterate the button. So how to make the EditText expand as much as it can?