You are using android:layout_weight = "1" for both TextView and EditText, which makes them occupy the screen space equally. Instead you should use something like "0.1" for the EditText and "0.9" for TextView.
You should also set android:multiline="true" for EditText, otherwise everything that the user types will remain in just one line. Your parent LinearLayout's layout_height is "fill_parent" which will still make the EditText stretch a bit ....if you want it to be strictly just one line then you could: 1) set the EditText's android:layout_height to 1dip, instead of wrap_content, but then it wont expand when the user types more than 1 line 2) set the parent LinearLayout's layout_height to "wrap_content" But again that wouldn't look too good, your UI will look a bit squished...its good to leave some padding. 2008/9/28 Christine <[EMAIL PROTECTED]> > > 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 -~----------~----~----~----~------~----~------~--~---

