2013-03-14 27 views
0

我使用edittext中的圖像。圖像是相當大的,因此光標進來中間我在中心獲取光標。我想要這個光標在編輯文本的頂部

<EditText 
    android:id="@+id/titletobeset" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:maxHeight="200dp" 
    android:maxLines="200" 
    android:background="@drawable/wallpape" 
    android:layout_marginLeft="4dp" 
    android:layout_marginRight="4dp" 
    android:cursorVisible="true">  
</EditText> 

回答

1

使用

android:gravity="left|top" 

重力可以設置文字這的確是光標的起始位置

1

嘗試添加的位置編輯文本中的以下屬性

android:gravity="top" 
android:inputType="textMultiLine"