Text for links android
Hello I would like to have a link to a website but with a different text on the link like a html anchor tag <a href="google.com">Alternative text</a>
.
Can anyone sho开发者_JAVA技巧w any example on this? I have tried Linkify without success.
Try this:
mTextField1.setText(spanned);
mTextField1.setMovementMethod(LinkMovementMethod.getInstance());
here mTextField1 is a TextView object and spanned is a Spanned object.
精彩评论