protected void logSpannableString(String msg) {
SpannableStringBuilder contents = new SpannableStringBuilder();
contents.append(Html.fromHtml("<font color=\"#ff0000\"><b>" + msg
+ "</b></font>"));
contents.append('\n');
contents.append(Html.fromHtml("<font color=\"#0000ff\">"
+ txvStatus.getText() + "</font>"));
txvStatus.setText(contents);
}
这只是其中一种方法。