Reputation: 4559
I have an EditBox
in which I set the input type as textMultiLine
. The issue is that the cursor in the EditBox
always appears at the center of the EditBox
, But I want it to display at the top left of my EditBox.
So why this happens?
Code for EditBox
<EditText
android:id="@+id/notes_edit_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:background="@drawable/img_add_notes_textbox"
android:inputType="textMultiLine"
android:maxHeight="30dp"
android:paddingLeft="15dp"
android:scrollbars="vertical"
android:textColor="#121212" >
</EditText>
ScreenShots
Upvotes: 0
Views: 183
Reputation: 109237
Because, by default gravity of EditText
is center
so just set it to top
android:gravity="top"
Upvotes: 4