I append extra info to a url that I do not want to show to the user in the textView. Here is what I am doing, but the href link is not the one getting used. This code goes to www.google.com, not the link I put in the href tag. My link is not to Google, just showing this as example of functionality. Any ideas?
String agreementText = context.getString(R.string.PhraseAgreement_Part1);
Spanned fullEulaText = Html.fromHtml(agreementText + "\n <a href=‘http://www.google.com?pcode=somePartner’>www.google.com</a>");
Linkify.addLinks((Spannable) fullEulaText, Linkify.WEB_URLS);
My textView has the tv.setMovementMethod(LinkMovementMethod.getInstance());
And my xml has the android:autoLink="web"
UPDATE SOLVED: It turns out it was a combination of items. First, in my xml, I needed to remove:
android:autoLink="web"
android:linksClickable="true"
Then, I also needed to remove:
Linkify.addLinks((Spannable) fullEulaText, Linkify.WEB_URLS);
And for the textView that I am setting the text (Spannable) to:
tv.setText(TermsAndConditionsUtilities.buildAgreementText(this));
tv.setMovementMethod(LinkMovementMethod.getInstance());
Now I get a url displayed to the user that has an anchor tag url that appends extra info onto to send to the server.