大量的文本將被追加到StringBuffer對象。稍後,此文本將顯示在頁面上。可能以編程方式格式化通過stringBuffer.append()附加的文本?
stringBuffer.append("A lot of text part 1");
stringBuffer.append("A lot of text part 2");
...
該文本包含段落標題。附加前後可以對這些標題進行格式化嗎?喜歡的東西
stringBuffer.append("Title of text 1");
//in this line do some formatting to the above text, like make title bold, larger font, etc.
stringBuffer.append("A lot of text part 1");
我知道,它可以,如果我在XML佈局設置TextViews來完成,但它只是太多的冠軍,這樣會花費這麼多的時間。