Textview text all one line


#1

Why does this produce text all on one line. I want each span to be a new line of text.

<TextView editable="false" margin="20px" marginTop="10px" fontSize="16px" textWrap="true">
					<FormattedString>
						<Span text="Line 1." />
						<Span text="Line 2." />
						<Span text="Line 3." />
						<Span text="Line 4." />
						<Span text="Line 5." />
					</FormattedString>
				</TextView>

#2

Add a line break whenever you want to go to next line, span doesn’t mean it should start a new line.


#3

What should I use as a line break. I have tried \n in the text but this just displays as text. i.e “Line 1. \n”


#4

#5

Ah thats why. I’m putting the text in XML. Many thanks for the response.