Android: Vertical alignment for multi line EditText (Text area)
Solution 1:
Use android:gravity="top"
Solution 2:
This is similar to CommonsWare answer but with a minor tweak: android:gravity="top|start"
. Complete code example:
<EditText
android:id="@+id/EditText02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="5"
android:gravity="top|start"
android:inputType="textMultiLine"
android:scrollHorizontally="false"
/>
Solution 3:
U can use this Edittext....This will help you.
<EditText
android:id="@+id/EditText02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:lines="5"
android:gravity="top|left"
android:inputType="textMultiLine" />
Solution 4:
Use this:
android:gravity="top"
or
android:gravity="top|left"