0

I have a text to display as TextView in Android, the text consists of various lines like this:

Text1

Text2

Text3

But the problem is that when displayed it appears like this ignoring the line breaks:

Text1 Text2 Text3

I know what you are thinking, just add \r\n at the end of every line, but this isn't an option at the moment for me.

Is there a way to have Android respecting the line breaks in the text?

Thanks! Jose

Community
  • 1
  • 1
Jose Gonzalez
  • 1,491
  • 3
  • 25
  • 51

1 Answers1

-2

You're going to need to use \r\n, sorry.

Notepad++ can find and replace linebreak charaters with \r\n. Not sure if You'd be able to do it programatically

András Ottó
  • 7,605
  • 1
  • 28
  • 38
BooleanCheese
  • 615
  • 12
  • 34