I have the following TextView defined:
The following should work for anyone who is looking for a combination of text and hyperlink within an Android app.
In string.xml
:
Looking for Digital Visiting card?
Get it here
Now you can utilise this string
in any given View
like this:
Now, in your Activity or Fragment, do the following:
TextView getapp =(TextView) findViewById(R.id.getapp);
getapp.setMovementMethod(LinkMovementMethod.getInstance());
By now, you don't require to set android:autoLink="web"
or android:linksClickable="true"
using this approach.
I hope you will find this helpful.