0
我要像做 Click <a href='www.google.com'>Here</a>
的Android Linkify一個完全無關的字符串
。我嘗試使用以下:
TextView sponsoredlink = new TextView(this);
sponsoredlink.setId(R.id.details_sponsored_link);
sponsoredlink.setText("Click Here");
Pattern pattern =Pattern.compile("Here");
String link = "www.google.com";
Linkify.addLinks(sponsoredlink, pattern, link);
,但我只是結束了一個鏈接www.google.comhere [原文]