Use android:gravity="top|left" on the second EditText. 13 февраля 2012 г. 15:55 пользователь John Goche <[email protected]> написал: > Hello, > > I have the following in my layout XML file. Basically I want the address > EditText to take up all the space available below the other name EditText > so that the first one is a one line edit text and the second one is a > multiline > edit text. However, when I run my application the cursor in the second > EditText > is placed in the Middle of the widget. I want the cursor at the top. I have > seen > this done in some apps on android market but I cannot figure out how to do it. > > <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/name" > android:layout_width="fill_parent" > android:layout_height="wrap_content" /> > <EditText > android:id="@+id/address" > android:inputType="textMultiLine" > android:layout_width="fill_parent" > android:layout_height="fill_parent" /> > </LinearLayout> > > Any ideas on how to achieve the cursor placement at the very top rather than > in the middle. > > Currently, when the keyboard shows up I cannot see the text (which ends up > being typed under the keyboard). Ideally I would like the widget to always be > above the android soft keyboard. > > Thanks for your feedback, > > John Goche > > -- > 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
-- 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

