It is necessary to make an input method, like in a memo (who is familiar with Delphi, there was such a text field), so that the input takes place from the top line. I rummaged through the EditText settings, there is an increase in the number of lines, but still the string input is in the center.

Thank you in advance.

  • @tim_taller, do not forget to accept the answer. - angry

2 answers 2

Aligning text at the top and left in EditText:

 android:lines="5" android:gravity="left|top" 

Manifesto can not touch.

  • You are right, corrected. - Dex
  • one
    android: singleLine = "false" - can be omitted, because in this case, false will be. - Sviatoslav
  • @redsky, in this case as I understand this attribute is also deprecated - Dex
  • @Dex, something like that. In the description of EdiText: setSingleLine - ... if false, restores these to the DEFAULT conditions. in the textview description: android: singleLine - ... note: for editable text, multiline flag in the inputType attribute. - Sviatoslav

In the layout resources (or in the code), set the following attribute for the field:

 android:gravity="top" <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="top" android:singleLine="false" android:lines="5" />