how do i create a multiline string in EditText?

前端 未结 1 1741
陌清茗
陌清茗 2021-01-29 12:35

i want to display a string in a multiline EditText. Currently, the string displays as....

Receive: 0 coin(s) Total
             Cost: $100

I wa

相关标签:
1条回答
  • 2021-01-29 12:55

    You can use the android:minLines="3" for display the multiline in edittext. and for display cursor on the top of the edittext you can use like android:gravity="top."

    <EditText
                android:id="@+id/edittext"
                android:layout_width="match_parent"
                android:layout_height="fill_parent"
                android:minLines="3"
                android:maxLines="5"
                android:gravity="top"
                android:inputType="textMultiLine" />
    
    0 讨论(0)
提交回复
热议问题