How to increase the spacing between paragraphs in a textview

前端 未结 5 2081
余生分开走
余生分开走 2021-02-06 21:54

I have some text that have more than one paragraph (using \"\\n\") and want to put a spacing between the paragraphs, but without using \"\\n\\n\". But the text from the same par

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-06 22:41

    I'm afraid it's not adjustable in TextView. Here is the document of all the TextView attributes: https://developer.android.com/reference/android/R.styleable#TextView I guess the best way of doing this could be using one TextView for each paragraph, and then define margin between TextView.

    I think it's a similar design conception as p tag in html. Within the tag is a whole paragraph, then define the layout of p tag.

提交回复
热议问题