Questions tagged [linkify]

An Android utility class with which you can easily link to for example webpages, phone numbers or e-mail addresses.

Linkify is a text utility class in Android with which you can easily link to for example webpages, phone numbers or email addresses.

265 questions
3
votes
2 answers

AutoLink won't recognize an email as an email

I have a piece of code that should recognize an email, but doesn't. I think it is because the 'beginning' part of the email address (the part before the @ sign) only has two characters. Does anyone know how to fix this? I tried using…
Mairead
  • 275
  • 1
  • 2
  • 10
3
votes
2 answers

TextView getting highlighted after using linkify or autolink

I have a long text message followed by a link and have put this inside a TextView. It's simply like this:
sazwqa
  • 135
  • 1
  • 9
3
votes
1 answer

Android linkify without first character

I'm using Linkify to detect tags(#) in a TextView. Pattern userMatcher = Pattern.compile("\\B@[^:\\s]+"); String userViewURL = "https://www.instagram.com/explore/tags/"; Linkify.addLinks(tvComment, userMatcher, userViewURL); The url is supposed to…
3
votes
4 answers

Linkify to call java code

Is there a way to have a Linkify'd link call a method in my Activity or am I only allowed to use Linkify to create links to other activities / apps etc.?
Ben
  • 16,124
  • 22
  • 77
  • 122
3
votes
3 answers

Android -- autoLink

Is there any way to Linkify a specific TextView that is contained within a ListView? I tried using android:autoLink="all" but that didn't work. I was getting an out of context error. Important also to note: the ListView is my second view in the…
Ryan
  • 557
  • 3
  • 7
  • 19
3
votes
2 answers

Does Linkify work for TextView in Android?

I have this code working for my method that calls an EditText, I tried to use the same code for a TextView but it does not work. The text does not turn into a hyperlink like it does in EditText, does anybody know why? public class MainActivity…
Lucas
  • 71
  • 1
  • 2
  • 6
3
votes
1 answer

twitter linkify android all @mentions

I want to give a link all twitter @mentions on mytweets app in android. If I click on @mentions I want to open another page about of the @mentions. This code do not work. Firstly I want to search @mentions in tweet and I give link this @mentions…
baran
  • 423
  • 1
  • 4
  • 5
3
votes
1 answer

Creating links using linkify

I want to create the linkify with a simple html string like "Search stackoverflow with Google`". Have tried to use regular expression for detecting text parts with the following code, but the word "stackoverflow" did not show as a link on the…
AdrDev_CTS
  • 245
  • 4
  • 11
3
votes
1 answer

Is there any way to make custom Spannables on Android?

In my Android app I've got text views with links. Each of them is toggling a particular event (opening browser, starting another activity, etc...). To handle that, I haven't found any better solution than doing this: hi there!, this is a…
Romain Piel
  • 11,017
  • 15
  • 71
  • 106
2
votes
2 answers

Make Webview's auto links visible

A Webview will display links in the content HTML as having blue underlines. So if you have something in the HTML like blah blah ... it is clearly visible as a link. The Webview also allows you to click on phone numbers and…
Turnsole
  • 3,422
  • 5
  • 30
  • 52
2
votes
3 answers

Android Make hyperlinks in textview clickable

I am getting some HTML from server and showing in Textview. The HTML have some hyperlinks. I want that when user clicks some hyperlink, it opens that link's url in device browser but it is not working. I have read about Linkify and using…
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
2
votes
0 answers

about android linkify for maps

I am using linkify in my android app to auto recognize addresses. It works with some addresses but not others. One of the things that I noticed was that capitalization is an important thing for the address to be recognized. Spelling is also…
Ahsan
  • 2,964
  • 11
  • 53
  • 96
2
votes
2 answers

Markwon linkify in a composable Text

In Android using jetpack-compose, is there currently a way to display a text containing links in a @Composable Text? In legacy TextView, we used Markwon with linkify plugin. Markwon creates a Spanned object that we can set into the TextView's…
gpo
  • 3,388
  • 3
  • 31
  • 53
2
votes
3 answers

Linkify Android Transform Question

Trying to do something fairly simple. Taking text like this User Name: This is a comment I am making It is in a single TextView. I want to make the User Name a link. I decided that the easiest thing would be to surround the User Name with…
Leo
  • 4,652
  • 6
  • 32
  • 42
2
votes
1 answer

Linkify using pattern

Pattern pattern = Pattern.compile("[a-zA-Z]+&"); myCustomLink.setText("press Linkify& or on Android& to search it on google"); Linkify.addLinks(myCustomLink,pattern, "http://www.google.ie/search?q="); This code works perfectly but I cannot…
Parth
  • 331
  • 2
  • 4
  • 8