2014-12-21 5 views
0
내가 문자열 배열에 봉착

작동하지 :안드로이드 : LINEBREAK는 텍스트 뷰

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 

답변

0
articles[0] = "1. With the mixtures&lt;<br />2. Colors and others&lt;<br />"; 
// articles[1] = "3. Categories and people&lt;<br />4. Health and fitness"; 
관련 문제