android超链接

tv01 = (TextView)findViewById(R.id.tv01);
tv01.setTextColor(Color.RED);
tv01.setTextSize(22f);
 
//html字符:超链接
String htmlhref = "<a href=\"http:www.google.com.h快\">百度</a>";
//Html.fromHtml解析HTML,生成String
tv01.setText(Html.fromHtml(htmlhref));
//html字符:只显示超练级,不使用
//tv01.setAutoLinkMask(Linkify.All);
//出来显示还可以点击
tv01.setMovementMethod(LinkMovementMethod.getInstance()

本文出自 “android存储数据” 博客,转载请与作者联系!

你可能感兴趣的:(android,超链接,职场,休闲)