title: How to place hyperlink to a website on android app?
body: <p>I want to place a hyperlink on android app that I am developing.</p>
  
  <p>I tried this:</p>
  
  <p><strong>main.xml</strong></p>
  
  <pre><code>&lt;TextView 
  android:layout_width="fill_parent" 
  android:layout_height="fill_parent" 
  android:text="@string/hyperlink"
  android:id="@+id/hyperlink" 
  android:autoLink="web"
  &gt;
  &lt;/TextView&gt;
  </code></pre>
  
  <p><strong>The strings.xml</strong> </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;string name="app_name"&gt;WebLink&lt;/string&gt;
  &lt;string name="hyperlink"&gt;http://google.com&lt;/string&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>But the problem is, the link looks like this: <a href="http://google.com" rel="noreferrer">http://google.com</a> and I don't want to show the actual url.</p>
  
  <p><strong>1)</strong> How to replace link by text like "Click Here to visit Google" and the text is linked with the website url ?</p>
  
  <p><strong>2)</strong> How to place email address (same question, how to replace it with text something like "Click Here to Email" and the text should be linked with <a href="http://email@domain.com" rel="noreferrer">email@domain.com</a>)</p>
  
  <hr>
  
  <p>I also tried this tutorial: <a href="http://coderzheaven.com/2011/05/10/textview-with-link-in-android/" rel="noreferrer">http://coderzheaven.com/2011/05/10/textview-with-link-in-android/</a></p>
  
  <p>But I am getting following error messages: </p>
  
  <pre><code>Description Resource    Path    Location    Type
  http cannot be resolved to a variable   MyLink.java /MyLink/src/com/MyLink  line 21 Java Problem
  Syntax error on token "" &lt;br /&gt; &lt;a href="", ? expected after this token MyLink.java /MyLink/src/com/MyLink  line 21 Java Problem
  Type mismatch: cannot convert from String to boolean    MyLink.java /MyLink/src/com/MyLink  line 20 Java Problem
  </code></pre>