The following ignore new lines when I display them
private void post() {
String subject = "";
String message = "";
subject = etSubject.getText().toString();
message = etMessage.getText().toString();
edit: My edittext is already set to multiline however when I write multilined text in it it's returned as a single line with the cover above
edit2: i am getting the text from an editText and displaying it on a textview
Solved it by using replaceAll("\\n", "<br />")
message = etMessage.getText().toString().replaceAll("\\n", "<br />")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With