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
11
votes
4 answers

Android Espresso and Linkify

I am writing some tests for my Android app based on Espresso. After clicking on a link inside a TextView (created with the Linkify class) I need to assert I am seeing the correct screen. I tried performing a click on the TextView that contains the…
argenkiwi
  • 2,134
  • 1
  • 23
  • 26
11
votes
3 answers

Using Linkify.addLinks combine with Html.fromHtml

I have a TextView that gets it's data set by calling this: tv.setText(Html.fromHtml(myText)); The string myText contains partially formatted html data. For example, it might have font tags, but not have any url links formatted using
wnafee
  • 2,126
  • 16
  • 23
11
votes
4 answers

TextView selection with Spannable and LinkMovementMethod

What i did so far is a list view of textviews having the normal text and clickable spans: Clicking the span i'm opening the URL, clicking the item View around the textView leads to the listView OnItemClickListener navigating to the item details,…
A-Live
  • 8,904
  • 2
  • 39
  • 74
10
votes
3 answers

Android LinkMovementMethod in XML?

To enable Linkify behavior, I do this in code: textView.setMovementMethod(LinkMovementMethod.getInstance()); Is there a way to set this in the layout xml for the textview?
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
9
votes
4 answers

Android Linkify links textColor ignored, css style overrides possible?

I am using Linkify in my app, and visited link text is appearing as dark purple. My overall layout background color is dark blue so this is impossible to read. The text is set as white, but visited links are appearing as dark purple. How do I…
CQM
  • 42,592
  • 75
  • 224
  • 366
9
votes
1 answer

How do I tell linkify not to underline links?

Is there any way to tell linkify not to underline my links? I am already using textView.setLinkTextColor(stateList) to change the color, but I'd like to remove the underline that is inserts on the link. Is this even possible?
Ben
  • 16,124
  • 22
  • 77
  • 122
8
votes
3 answers

Android TextView Linkify intercepts with parent View gestures

The problem is that if i Linkify the textView the underliyng ScrollView don't listen the sweep Gestures I've setted.Is there a way to have Linkify without messing with the underliyng view's gestures? I tried to override ontouchEvent and return false…
weakwire
  • 9,284
  • 8
  • 53
  • 78
8
votes
3 answers

Handle Linkify onClick events with own intent

I have a textview that contains emails and I want to be able to click on them to launch an activity within my own app. I am using Linkify.addLinks(TextView, Linkify.EMAIL_ADDRESSES) to make the emails clickable, however this pops up a chooser asking…
thisiscrazy4
  • 1,905
  • 8
  • 35
  • 58
8
votes
3 answers

How to process textview for HTML and Linkify

I am trying to get a textview to process a hyperlink as well as phone numbers. Say my text is: "555-555-555, www.google.com, Google!" If I run Html.fromHtml() on this string, then the TextView shows Google! correctly as…
user1132897
  • 1,201
  • 1
  • 15
  • 27
7
votes
3 answers

Android TextView enable LinkiFy and Href tags

I want to set a text to the textview which contains href tags as well as normal http links. For ex, text like this "please click here. or visit http://yahoo.com". The issue is I am unable to set both…
Senthil
  • 513
  • 2
  • 13
  • 24
7
votes
3 answers

Handle clicks on TextView's links while using Linkify for finding and setting the links inside the text

i have a TextView filled with text which i get from a server. I'm using Linkify for handling all the link searching and for setting a URLSpan where needed throughout its addLinks method. The problem is that the default behavior when clicking a link…
Shirane85
  • 2,255
  • 1
  • 26
  • 38
6
votes
1 answer

Linkify + textIsSelectable

After using Linkify.addLinks(content, pattern_glos, scheme_glos, null, glosFilter); logs write 11-22 21:19:15.319: W/TextView(14718): TextView does not support text selection. Action mode cancelled. And text is not selectable. I need both and…
6
votes
3 answers

Disable the automatic Linkify of Webview

I have a webview that I am creating. It seems to automatically be linkifying numbers into tel: urls. I didn't see a way to remove this ability (at least nothing similar to the way to enable it on a textview). The code is pretty simple: // populate…
Innova
  • 1,751
  • 2
  • 18
  • 26
6
votes
1 answer

Android - Linkify Problem

I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links: 06-07 20:49:34.696: ERROR/AndroidRuntime(813): Uncaught handler: thread main exiting…
Ryan
  • 557
  • 3
  • 7
  • 19
6
votes
2 answers

autoLink="all" feature of TextView Android

I am using the autoLink="All" feature of TextView to linkify all urls and telephone numbers in a TextView. The problem I am facing is that on emulator, certain numbers are identified as phone numbers and are clickable. On real device, these numbers…
Rahul
  • 1,169
  • 1
  • 12
  • 27
1
2
3
17 18