I got the @s linkifying no problem with @([A-Za-z0-9_]+) like this:
Pattern atWordMatcher = Pattern.compile("@([A-Za-z0-9_]+)");//(\\s|\\A)
@(\\w+)");//"@([A-Za-z0-9_]+)");//Pattern.compile("\\b[A-Z]+[a-z0-9]+
[A-Z][A-Za-z0-9]+\\b");
String atViewURL =    "http://twitter.com/";;
Linkify.addLinks(textView, atWordMatcher, atViewURL);

However, when i try to do the same with hashtags the hashtag part is
not passed to the link. This is what I tried:
                Pattern hashWordMatched = Pattern.compile("[##]([A-Za-z0-9-_]
+)");
                String hashViewURL =    "http://search.twitter.com/search?
q=#";
                Linkify.addLinks(textView, hashWordMatched, hashViewURL);

It is not the matter of the hashViewURL (I tried with %23 etc.),
somehow the extracted hash is not appended to the url. The hash tag is
properly showing as link but the link only points to raw hashViewURL
from above http://search.twitter.com/search?q=#

Any ideas?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to