How can I make links in fromHTML clickable? (Android)

后端 未结 5 1287
温柔的废话
温柔的废话 2020-12-04 16:08

This seems like a trivial problem, but is has me kind of stumped. I want to load an HTML string using Html.fromHtml(), and have any links in the string to be clickable and o

5条回答
  •  感情败类
    2020-12-04 16:48

    String data="MyTest";
    
    textView.setText(data);
    textView.setText(Html.fromHtml(data));
    textView.setMovementMethod(LinkMovementMethod.getInstance());
    textView.setLinksClickable(true);
    

提交回复
热议问题