i’ve got a database with a field in var_char(2000).
in this field there’s text with some new line, like a normal text written:
hello
i am davide
bye
i put this text in a textview but i see the text like a unique line (hello i am davide bye), without newlines.
in iphone it is all normal and i’ve done nothing particular… but here no.
how can i?
i’ve tried with replace \n or replace \r\n o other things but without success.
Also with Html.fromHtml()
the singleLine(false) is deprecated, and it doesn’t work.
also text doesn’t work. it see the newline as a space
Try setting
android:singleLine="false"to your textView.Edit:
If this does not work check whether the string has a new line character using below code
Decimal value of Newline is either 10 or 13. While space character is 32.
Edit2 : I think TextView does not go to next line for \r which is 13.
So do