2

TextView is inside a Scroll View..

                       <TextView
                            android:id="@+id/meer_informative_content"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:paddingBottom="15dp"
                            android:autoLink="all" 
                            android:clickable="true"
                            android:textColor="@color/text_color"
                            android:textSize="@dimen/text_size" />

Code in Main Activity::

final TextView meer_con = (TextView)  
findViewById(R.id.meer_informative_content);
meer_con.setText("http://www.google.com");
Shoaib Mushtaq
  • 595
  • 4
  • 17
  • 1
    Possible duplicate of [How do I make links in a TextView clickable?](http://stackoverflow.com/questions/2734270/how-do-i-make-links-in-a-textview-clickable) – Rahul Tiwari Oct 07 '15 at 14:28

1 Answers1

1

you have to add MoveMentMethod in your textview to make it clickable

like this:

meer_con.setMovementMethod(LinkMovementMethod.getInstance());

Also put your url in anchor tag and treat URL as html:

meer_con.setText(Html.fromHtml("<a href="http://www.google.com">Google.com</a>"));

Rahul Tiwari
  • 6,851
  • 3
  • 49
  • 78