title: android make links in a TextView clickable
body: <p>First, I'll start by saying I've visited this two:</p>
  
  <p><a href="https://stackoverflow.com/questions/2734270/how-do-i-make-links-in-a-textview-clickable">question 1 about this subject</a>, <a href="https://stackoverflow.com/questions/9290651/make-a-hyperlink-textview-in-android">question 2 about this subject</a>
  and both have failed me.
  Second, my app is based on a single map fragment, i don't know if that's an issue, but the TextView is part of an info window which is displayed over the map.</p>
  
  <p>I have the following TextView in xml:</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/tv_link"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:layout_marginTop="20dp"
      android:linksClickable="true"
      android:autoLink="web" /&gt;
  </code></pre>
  
  <p>which I want to make into a link, I'm feeding  the text programatically, and can see the text as it is, but it is not clickable, or "hyper-link"ed.
  The following is the part where I set up the TextView in my activity:</p>
  
  <pre><code>TextView tvLink = (TextView) v.findViewById(R.id.tv_link);
  // make the link clickable
  tvLink.setClickable(true);
  tvLink.setMovementMethod(LinkMovementMethod.getInstance());
  String text = (String) urls.get(arg0.getTitle());
  // Setting the link url
  tvLink.setText(Html.fromHtml(text));
  </code></pre>
  
  <p>I have also tried making the TextView have attribute of <code>android:onClick="openBrowser"</code> and have this class openBroweser:</p>
  
  <pre><code>public void openBrowser(View view){
  
          //Get url from tag
          String url = (String)view.getTag();
  
          Intent intent = new Intent();
          intent.setAction(Intent.ACTION_VIEW);
          intent.addCategory(Intent.CATEGORY_BROWSABLE);
  
          //pass the url to intent data
          intent.setData(Uri.parse(url));
  
          startActivity(intent);
      }
  </code></pre>
  
  <p>but it also didn't work. I might have made a mess while trying the different approached, but I did try to separate each try. and am confused and in need of an outside look.</p>
  
  <p>EDIT 1 :
  added the following:</p>
  
  <ol>
  <li>My string in the res file (inside a string-array)</li>
  </ol>
  
  <p><a href="http://www.rishonim.org.il/petach-tikva/Info/site_show.aspx?id=1026" rel="nofollow noreferrer" >Click here for more info about this location</a></p>
  
  <p>(which works here, so I assume it should be a legal link as needed)</p>
  
  <ol start="2">
  <li><p>My whole XML file as requested in comment</p>
  
  <p>
  </p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/tv_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textStyle="bold"
          android:layout_gravity="center_horizontal"
          /&gt;
  
      &lt;TextView
          android:id="@+id/tv_info"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          /&gt;
  
      &lt;TextView
          android:id="@+id/tv_link"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_marginTop="20dp" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;ImageView
      android:id="@+id/iv_image"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:adjustViewBounds="true"
      android:layout_gravity="center_horizontal"
      android:layout_marginTop="20dp"
      /&gt;
  </code></pre>
  
  <p></p></li>
  </ol>