Closed CripyIce closed 7 years ago
@CripyIce sorry for the delayed response, I just read this issue. I am seriously considering your suggestion since hyperlink implementation can be different from app to app.
I'm also considering displaying quick webpage as suggestion to hyperlink.
Hi there, no problem at all! So, what do you suggest I could do in the meanwhile?
For now hyperlinks can be retrieved this way:
@NonNull
private static <V extends TextView & SocialView> Collection<String> getHyperlinks(@NonNull V v) {
Collection<String> list = new ArrayList<>();
if (!v.isHyperlinkEnabled()) {
return list;
}
Matcher matcher = Patterns.WEB_URL.matcher(v.getText());
while (matcher.find()) {
list.add(matcher.group(0));
}
return list;
}
I'll update this thread for more updates :)
Great!! I'll check it later.. and will wait for updates on this thread. Thanks!!!
Hi @HendraAnggrian, been a busy week, but now that i'm on it i see that i can get a collection of the hyperlinks there are in the textview for example. But what i wanted is an example of listening to hyperlink clicks. For example, i have a textview with an URL written inside and i want when user click that URL it will open chrome custom tabs. Any idea?
@CripyIce my bad I might have misunderstood the request last week. I understand now that hyperlink clicks needs to be customized as well. New version is almost ready with this feature (along with others), I just need to complete few tests.
@HendraAnggrian looking forward for this update! Thanks man.
Version 0.16.2 is out with custom hyperlink click listener, let me know how that works for you.
@HendraAnggrian Great!! it works well and finally i can listen to hyperlink clicks. Thanks man!
Hi there @HendraAnggrian, Is there any way i can listen to hyperlink clicks and get the URL of it? Thanks.