How to wrap text in textview in Android

前端 未结 18 1051
旧巷少年郎
旧巷少年郎 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:47

    I am using Android 2.2 and my textview will automatically goto the next line if it exceeds the screen.

    If you would like to have the text goto the next line before the end of the screen, just add in (just put in your own dp value). This will be useful if you have a picture on the right of the text.

    android:layout_marginRight="52dp"
    

提交回复
热议问题