Code example for URLSpan

0
		int end = mSB.length();
		int start = tm.getStart();
		if (start != end) {
			String href = tm.getAttributes().getValue("", "href");
			if (href != null) {
				mSB.setSpan(new URLSpan(href), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
			} 
		} 
	} 
 
	private void endHeader(TagMarker tm, int i) {
		int start = tm.getStart();
		int end = mSB.length();
 
		// Back off to change only the text, not the blank line. 
		while (end > start && mSB.charAt(end - 1) == '\n') {
			end--;
		} 
 
		if (start != end) {