Android: how to make text (String type, method addCellText) as a hyperlink?

The method addCellText(LinearLayout row, float weight, String text) return TextView. Therefore, I can to make TextView as a hyperlink:

TextView someData = addCellText(row, 2, someStringValue);
someData.setMovementMethod(LinkMovementMethod.getInstance());
String text = "<a href="http://www.google.com">" + someStringValue + "</a>";
someData.setText(Html.fromHtml(text));

Leave a Comment