how to make anchor tag in android clickable

♀尐吖头ヾ 提交于 2019-11-30 23:41:05

You need to call setMovementMethod:

aboutL1.setMovementMethod(LinkMovementMethod.getInstance());

(you may not even need to call Linkify.addLinks since you used Html.fromHtml, but I can't totally remember).

aboutL1.setLinksClickable(true);

in XML should be

<TextView
    android:id="@+id/aboutL2"
    android:autoLink="web"
    android:linksClickable="true"
/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!