php - Java: AlertDialog not printing new line -
my app using alert dialog box display message obtained php file.
the message couple of strings, , box should display like:
string 1 string 2 string 3
however displaying like:
string 1string 2string 3
i've tried various ways add in new line, both php end , on java end. here have far:
protected void onpostexecute(list<string> result) { string message=""; for(int =0; i<result.size(); i++) { message+=result.get(i)+"\n"; } alertdialog.setmessage(message); alertdialog.show(); }
i obtaining correct strings php file, newline not printing. there other way can that? tried resize box didn't @ all.
use system.lineseparator(); newline
message += result.get(i) +system.lineseparator();
Comments
Post a Comment