0

I have a TextView with HTML text which contains two hyperlinks:

<string name="agreement"><![CDATA[By signing up I agree to <a href="file:///android_asset/terms.html">Terms of Use</a>, Payment terms and <a href="http://www.google.com">Legal Policy</a>]]></string>

Both links are clickable, but the first one fails to be opened by any viewer on my Nexus 5. Some application appears for a second, then it shuts down and a toast is saying "Cannot display PDF (terms.html cannot be opened)"

How can I make the local hyperlink open HTML file in browser?

Andrew
  • 490
  • 3
  • 18

1 Answers1

0

Actually you can simply use webview

Dharvik shah
  • 1,969
  • 12
  • 27
  • sure I can, but then I have to handle link clicks myself and split the TextView into clickable and not clickable ones. – Andrew Jul 22 '16 at 12:55
  • okay here is one another solution that might help you : http://stackoverflow.com/questions/2116162/how-to-display-html-in-textview – Dharvik shah Jul 22 '16 at 13:04