Try removing the weight from the EditText and making the height of the 
TextView 0dip. The LinearLayout takes the unused space it has and 
distributes it out to the children with weight assigned. Each child with a 
weight gets a size based on its own weight dived by the total weight 
requested.

On Sep 28, 2008 12:52 PM, "Christine" <[EMAIL PROTECTED]> wrote:


Hi,
I'm struggling with the following. I have an EditText and a TextView
in a LinearLayout, like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
       android:orientation="vertical"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent">
 <EditText android:id="@+id/status"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:singleLine="true"
       android:gravity="top"
       android:paddingLeft="3dip"
       android:paddingRight="3dip"
       android:layout_weight="1"/>
 <TextView android:id="@+id/timeline"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:layout_weight="1"
       android:gravity="top"
       android:paddingLeft="3dip"
       android:paddingRight="3dip"
       android:scrollbars="vertical" />
</LinearLayout>

I want the EditExt to be one line, the TextView to fill up the rest of
the screen. Ideally, the EditText would still grow with the number of
lines the user types. I've tried android:height, android:maxHeight,
android:singleLine, but nothing seems to work. I'm sure I'm
overlooking something simple.....




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to