How to increase the spacing between paragraphs in a textview

前端 未结 5 2074
余生分开走
余生分开走 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:34

    You can use

    Html.fromHtml(String);
    

    This will help you to write string in form of html where you can use the html tags like

    ,

    etc

    Eg:

    myTextView.setText(Html.fromHtml("

    This is it first
    paragraph.

    This is the second
    paragraph.

    "));

提交回复
热议问题