开发者

Add line break when reading text from xml

In my application开发者_如何学编程, I'm parsing a local xml file, store the read texts in an array list and set the texts in text views. the problem is that I can't use the \n sequence to get a line break in the text view. The text view will display the \n characters as any other text. If I try to use the html tag

, I'm getting a runtime error.

Is there a way to specify the line breaks when reading the text from an xml file?


public static String newline = System.getProperty("line.separator");

instead "\n" now use "newline"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜