Blogger Text

My Aim to Provide you quality contents, Tips & Tricks, Software, Microsoft Office, Graphic Editing (Adobe PhotoShop, After Affects, Illustrator, inDesign) Corel Draw, Corel Video Studio, Cyberlink PowerDirector, Power ActionCinema, Tutorials about Blogging and VU Assignments, Quizes & GDB Solutions and Much More... at regular Basis
                                     ***    Kindly Subscribe our Official YouTube Channel "INFOPALACESS OFFICIAL-Tuts: in this channel we upload Programming (C,C++,C# JAVA, PHP), Web Development, Graphics Editing and Microsoft Office Step by Step Tutorials from bigginer to Advance Level. We also provide free online courses at our YouTube Channel. ***   Graded Assignments/Quizes and GDB will start in Next Week. Solution ideas of All assignments, Quizes and GDB will be available here. If you have any problem regarding this then you can contact us.

How to Add and Open Links from TextView in Android Studio

Here I am going to explain a very simple method to implementing hyperlinks to any TextView in android studio.
For better understanding watch the video below (In HD+ Quality) for step by step guidance.
 Steps involved in video also described below:
There are following 3 steps involved to Create a Static Clickable Link Inside the TextView.  
1-  Adding TextView in Activity
2-  Adding String in string.xml
3-  Implementing code in

1-  Adding Some TextView

First of all we need to add TextView into Main-activity.xml

    app:layout_constraintTop_toTopOf="parent" />

2-  Adding A New String into String.xml

Now Go to res à values à string on left side menu and create a new string as like this string in strings.xml:

<string name="infopalacesslink"><a href="">Go To My Website</a></string>

3-  Implementing code in

Now Go to “” and write this code:
TextView text = (TextView) findViewById(;

For more detail please refer to Picture below: 

You are done! You should get a TextView like the one in the following screenshot and when you tap on the hyperlink the browser should open! Cool!

  Note!   you want to open a static link without doing other operations? So just follow the first part of this tutorial! Otherwise, if you want to have more control on the link customization and operations after the user taps on it, follow the second part of the tutorial which will come later.

Post a Comment