Android textview 加载html语言(解决超链接不能使用的问题)

来源:互联网 发布:kmspico是什么软件 编辑:程序博客网 时间:2024/04/29 22:20

  String about = "<br/>test<br/><br/>" +     "联系方式:<br/><a href=\"mailto:xiaohong@163.com\">小红</a><a href=\"www.baidu.com\">www.baidu.com</a>

 

TextView textView = (TextView)findViewById(R.is.text);

textView.setText(Html.fromHtml(about));

textView.setMovementMethod(LinkMovemementMethod.getInstance());

原创粉丝点击