例如
TextView tv =(TextView)this.findViewById(R.id.tv);
tv.setAutoLinkMask(Linkify.ALL);
tv.setText("visit website, http://www.google.com");
压在http://www.google.com http://www.google.com会带我去http://www.google.com http://www.google.com。
我想做的事情是这样的
TextView tv =(TextView)this.findViewById(R.id.tv);
tv.setAutoLinkMask(Linkify.ALL);
tv.setText("visit this website");
然后按“这个”我想带我去http://www.google.com http://www.google.com.
我怎样才能做到这一点 ? (这有可能吗?)
从 API 演示来看,
TextView t3 = (TextView) findViewById(R.id.text3);
t3.setText(Html.fromHtml(
"<b>text3:</b> Text with a " +
"<a href=\"http://www.google.com\">link</a> " +
"created in the Java source code using HTML."));
t3.setMovementMethod(LinkMovementMethod.getInstance());
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)