我想在点击 textview 链接时打开http://www.google.com 。但它启动浏览器但在地址栏中显示 wwww.google.com%27 并产生错误。请提供解决方案。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView textView=(TextView)findViewById(R.id.textView1);
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());
String text="<a 'href=http://www.google.com'> Click to open Google!!! </a>";
textView.setText(Html.fromHtml(text));