TextView.setText()不支持HTML格式的输出,若要在正文中输出链接,则要在XML文件的TextView中加上android:autoLink="all"
<TextView
android:id="@+id/myTextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="all"
android:text="百度:http://www.cnblogs.com/hanyonglu/archive/2012/04/07/2435589.html"
>
</TextView>
TextView.setText()同时还支持CharSequence和String类型,其中CharSequence可以获取XML中字符
CharSequence str2 = getString(R.string.hello_world);
String str3 = "爱神的箭";
tview.setText(str2+str3);