I\'m implementing a TextView with a string containing two hyperlinks as below but the links are not opening a new browser window:
Have a look on below code snippet, hope it helps,
TextView textView =(TextView)findViewById(R.id.textView);
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());
String text = "<a href='http://www.google.com'> Google </a>";
textView.setText(Html.fromHtml(text));
I would recommend you to have two TextViews
since ou want two different actions:
TextView yourTermsOfUseTextView = (TextView) findViewById(R.id.your_id);
yourTermsOfUseTextView.setOnclickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(your_download_link));
startActivity(myIntent);
}
});
Repeat to the privacy policy.