Gratzi
Gratzi

Reputation: 4693

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?

Upvotes: 0

Views: 354

Answers (1)

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

instead "\n" now use "newline"

Upvotes: 1

Related Questions