public class Test10Activity extends Activity {
TextView textView ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test10);
textView = (TextView) findViewById(R.id.text);
String webLinkText = "<a href='https://souly.cn'> html超链接测试</a>" ;
textView.setText(Html.fromHtml(webLinkText));
}
}
Textview超链接
最新推荐文章于 2021-05-26 12:46:07 发布