0
我有一个字符串数组不工作:的Android:换行中的TextView
String[] articles = getArticles();
// articles[0] = "1. With the mixtures<br />2. Colors and others<br />";
// articles[1] = "3. Categories and people<br />4. Health and fitness";
StringBuilder sb = new StringBuilder();
for (String text : articles) {
sb.append(text);
}
String content = sb.toString();
Spanned spanned = Html.fromHtml(content);
textView.setText(spanned);
的问题是,在textView
我得到的HTML标签,而不是应用换行符。
1. With the mixtures<br />2. Colors and others<br />3. Categories and people<br />4. Health and fitness