Code example for URLSpan

Methods: getURL

0
								Selection.removeSelection(buffer);
								return true; 
							} else if(action == MotionEvent.ACTION_DOWN) {
								Selection.setSelection(buffer, buffer.getSpanStart(link[0]), buffer.getSpanEnd(link[0]));
								URLSpan s = (URLSpan) link[0];
								mUrl = s.getURL();
								mLinkSet = true;
								return true; 
							} 
							return false; 
						} else { 
							Selection.removeSelection(buffer);
						} 
					} 
				} 
 
				return false; 
			} 
		}); 
 
		setLongClickable(true);