Android: Vertical alignment for multi line EditText (Text area)

后端 未结 7 537
独厮守ぢ
独厮守ぢ 2020-12-04 06:54

I want to have 5 lines for the height of the text area. I am using the following code.



        
相关标签:
7条回答
  • 2020-12-04 07:47

    Now a day use of gravity start is best choise:

    android:gravity="start"
    

    For EditText (textarea):

    <EditText
        android:id="@+id/EditText02"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:lines="5"
        android:gravity="start"
        android:inputType="textMultiLine"
    />
    
    0 讨论(0)
提交回复
热议问题