How to have HTML New Line Feature in Android Text View?

前端 未结 6 1560
终归单人心
终归单人心 2021-01-01 12:38

I am using webservice in my android application. In my webservice result I get a HTML formatted String as result.

Assume this is my web service result:

6条回答
  •  遥遥无期
    2021-01-01 13:07

    have you tried with \r\n ?`

    If this not works then you can try with : \n with escape sequence : \\\n
    I hope this will help you :)

    Something like this

    string = string.replace("\\\n", System.getProperty("line.separator"));
    

提交回复
热议问题