Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AlertDialog message with new line. (\n doesn't work.)

I need to use a break-line in a AlertDialog on Android. I already tried with the "\n" character but it doesn't work. I don't see the "\n" character but the text wont wrap.

Any help?

like image 310
Mauro Valvano Avatar asked Jun 11 '14 15:06

Mauro Valvano


1 Answers

You can use Spanned text using Html.fromHtml("some string" + "<br>") to create new line on some textview element.

like image 109
ikhsan Avatar answered Sep 26 '22 02:09

ikhsan