I have a lot of text, and I want to make a link in the middle of that.
This is how it looks like, and the www.rkz.nl is what i want to be a link.
I have a lot of text, and I want to make a link in the middle of that.
This is how it looks like, and the www.rkz.nl is what i want to be a link.
make that text in the string file and then connect the string with the link you want
Using Xml
<TextView
android:text="Click my My Url: www.google.com"
android:id="@+id/tvUrl"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:autoLink="web">
programmatically
final TextView tvUrl= (TextView)findViewById(R.id.tvUrl);
tvUrl.setText("Click my My Url: www.google.com");
Linkify.addLinks(tvUrl, Linkify.WEB_URLS);
found a similar question try this Dynamically setting links to text in strings.xml or try this
TextView textView =(TextView)findViewById(R.id.textView);
textView.setClickable(true);
textView.setMovementMethod(LinkMovementMethod.getInstance());
String text = "<a href='http://www.google.com'> Google </a>";
textView.setText(Html.fromHtml(text));
here google will be displayed as a link