In my code,am having EdiText and its code is:
<EditText
android:layout_height="150dp"
android:id="@+id/profiledescription"
android:imeOptions="actionDone|flagNoExtractUi"
android:textSize="16sp"
android:paddingLeft="20dp"
android:l开发者_如何学Pythonayout_width="fill_parent"
android:enabled="false"
android:layout_marginRight="20dp"></EditText>
But the problem is cursor is starting from middle rather than usual first position:
You'll probably need to set android:gravity="top"
for the corresponding XML-element in the layout.
Try specifying the following in your EditText XML declaration:
<EditText android:gravity="left|top" ... />
Hope this helps!
You need to add android:gravity="top"
to the layout for that EditText
.
<EditText
android:layout_height="150dp"
android:id="@+id/profiledescription"
android:imeOptions="actionDone|flagNoExtractUi"
android:gravity="top"
android:textSize="16sp"
android:paddingLeft="20dp"
android:layout_width="fill_parent"
android:enabled="false"
android:layout_marginRight="20dp">
</EditText>
Use the following:
android:gravity="top" android:singleLine="false"
精彩评论