<TextView
android:id="@+id/testweb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoLink="web" //是将文本的web网址解释成超链接
android:text="@string/link_text_auto"
/>
在TextView中使用超级连接有几种方式: autoLink:一共有几种值:web,phone,map,email.all.none. 分别是url连接。电话号码提取拨号,地图地址。电子邮件,全部解释就是能支持的超级连接全部起作用, none就是默认情况,没有超链接。 2.使用html文本: 例如:
3.在java代码中添加超级连接:
使用: SpannableString
|