, . , blammo . blammo, google.com.
- :
class sampleTransformFilter implements TransformFilter {
public String transformUrl(Matcher match, String url) {
return "http://google.com";
}
}
class sampleMatchFilter implements MatchFilter {
public boolean acceptMatch(CharSequence s, int start, int end) {
return true;
}
}
Pattern sampleMatcher = Pattern.compile("blammo");
String sampleURL = "";
Linkify.addLinks(textView, sampleMatcher, sampleURL, new sampleMatchFilter(), new sampleTransformFilter());