linkify

Ruby linkify for urls in strings

There have been a few posts about linkifying text using a regex. The most popular is this post. However my spec is a little more tricky: describe TextFormatter do def l(input) TextFormatter.gsub_links!(input){|link| "!!#{link}!!"} end it "should detect simple links" do l("http://www.cnn.com").should == "!!http://www....

How to linkify to in-built apps like Contacts?

I have an empty TextView set for my ListView. When there is no data, it shows the empty text, where I have description that they should go to Contacts application. How can I linkify "Contacts" word so when tapped opens the Contacts application? ...

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 ViewFlipper. I have also tried: View mItemView = mAdapter.getView(2, null, ...

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 due to uncaught exception 06-07 20:49:34.745: ERROR/AndroidRuntime(813): android.util.An...

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.? ...

android linkify intent

I have a ListView that uses Linkify to create a link to another activity in my app. the url looks something like content://com.myapp/activitiy/view?param=blah this works fine every time. however, in another view, I'm trying to call some code like this: Intent i = new Intent("content://com.myapp/activity/view?param=blah"); i.set...

android linkify without underlines

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 there for the link. Is this even possible? ...

android Linkify first occurence only

i am using Linkify with a custom TransformFilter. Is it possible to tell linkify to only match the first occurence of my pattern? ...

Android Linkify from HTML in TextView

I have HTML with standard links which correspond to commands I'd like to handle. This is <a href="CMD:nice">a command</a>. I populate a TextView with Html.fromHtml() How can I use the Android Linkify system to convert the links to Linkify'ed ones? ...

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? ...

Cannot import android.text.util.Regex? Where is it?

I'm developing an application and I want to use android.text.util.Regex.WEB_URL_PATTERN as the pattern for the Linkify. But, as I have notice, I cannot import android.text.util.Regex for some reason. Why so? Is there a way to workaround this? ...

Android Linkify stops getSelectedItemPosition() from working?

I have a ListView which has a TextView in the row. The TextView has been Linkified and has had setMovementMethod(LinkMovementMethod.getInstance()) set on it. The ListView is no longer selectable and the ListView's getSelectedItemPosition() always return -1 . Is there a way to know where the ListView has scrolled to in this case? ...

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: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:orientation="verti...

Android Linkify TransformFilter is not transforming

Hello there, I'm working with a CheckBox that needs to hace some links appearing as text, not urls. I'm using something like this: TransformFilter transformer = new TransformFilter() { @Override public String transformUrl(Matcher match, String url) { Log.d(" ", match.toString() + " |||...

Can I change TextView link text after using Linkify?

Is is possible to change TextView text after using Linkify to create links? I have something where I want the url to have two fields, a name and id, but then I just want the text to display the name. So I start off with a textview with text that includes both name and id, and linkify to create the appropriate links with both fields. But...