java - Html.fromHtml(String) + Linebreak Problem -


i'd display text linebreak in alert message:

private void showabout() {         alertdialog.builder builder = new alertdialog.builder(context);          string message = "<b>rechtlicher hinweis:</b>\nlorem ipsum dolor sit amet, consectetur adipiscing elit. sed dolor sapien. etiam arcu erat, lobortis sed vestibulum ut, adipiscing et enim. nulla vestibulum volutpat dolor, non pellentesque purus imperdiet vitae. aenean et elit vel erat consectetur pulvinar. sed semper, ante vel elementum aliquet, dui urna scelerisque tortor, eu auctor lorem nunc adipiscing velit. praesent eget libero diam, eget imperdiet sem. vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae.\n" + getversioninfo();          builder.setmessage(html.fromhtml(message));         builder.setcancelable(false);         builder.setpositivebutton("close", new dialoginterface.onclicklistener() {             public void onclick(dialoginterface dialog, int id) {                 dialog.cancel();             }         });         builder.settitle("about");          builder.seticon(r.drawable.icon);           alertdialog alert = builder.create();           alert.show();      } 

however works more or less fine, linebreaks

\n

aren't displayed @ all. tried replace \n \\n or <\br> nothing worked. hints how this?

try <br /> (note slash after tag name plus it's forward slash, not backward one).


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -