Code example for URLSpan

0
        } 
    } 
     
	private static final void applyLink(String url, int start, int end,
			Spannable text) {
		URLSpan span = new URLSpan(url);
		text.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
	} 
 
    private static final String makeUrl(String url, String[] prefixes,
            Matcher m, TransformFilter filter) {
        if (filter != null) {
            url = filter.transformUrl(m, url);
        } 
 
        boolean hasPrefix = false;
         
        for (int i = 0; i < prefixes.length; i++) {
            if (url.regionMatches(true, 0, prefixes[i], 0,
                                  prefixes[i].length())) {
                hasPrefix = true;