How to wrap text in textview in Android

前端 未结 18 1139
旧巷少年郎
旧巷少年郎 2020-12-08 18:03

Does any one know how to wrap text in TextView in Android platform. i.e if the text in textview exceed the screen length it should be displayed in the second line.

I

18条回答
  •  长情又很酷
    2020-12-08 18:43

    Try @Guykun's approach

    android:layout_weight="1" android:ellipsize="none" android:maxLines="100" android:scrollHorizontally="false"

    Also, make sure that parents width is not set to wrap content. This is the thing that I was missing.

提交回复
热议问题