FileDocCategorySizeDatePackage
URLSpan.javaAPI DocAndroid 1.5 API1751Wed May 06 22:41:56 BST 2009android.text.style

URLSpan

public class URLSpan extends ClickableSpan implements android.text.ParcelableSpan

Fields Summary
private final String
mURL
Constructors Summary
public URLSpan(String url)

        mURL = url;
    
public URLSpan(android.os.Parcel src)

        mURL = src.readString();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public intgetSpanTypeId()

        return TextUtils.URL_SPAN;
    
public java.lang.StringgetURL()

        return mURL;
    
public voidonClick(android.view.View widget)

        Uri uri = Uri.parse(getURL());
        Context context = widget.getContext();
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
        context.startActivity(intent);
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeString(mURL);