tags:

views:

68

answers:

1

I have two EditTexts within a LinearLayout.

I want these to take half of the screen width each. I have been playing with layout weight but and layout width to wrap content but the fields resize based on their inputs length.

Any ideas?

+2  A: 

Is this what you were after?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent" android:layout_height="wrap_content"
 android:orientation="horizontal">

 <EditText android:id="@+id/TextView01" android:layout_width="fill_parent"
  android:layout_height="wrap_content" android:text="first box"
  android:layout_weight="1" ></EditText>

 <EditText android:id="@+id/TextView02" android:layout_width="fill_parent"
  android:layout_height="wrap_content" android:text="second box"
  android:layout_weight="1"></EditText>
</LinearLayout>
Anthony Nolan