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

QuoteSpan

public class QuoteSpan extends Object implements LeadingMarginSpan, android.text.ParcelableSpan

Fields Summary
private static final int
STRIPE_WIDTH
private static final int
GAP_WIDTH
private final int
mColor
Constructors Summary
public QuoteSpan()


      
        super();
        mColor = 0xff0000ff;
    
public QuoteSpan(int color)

        super();
        mColor = color;
    
public QuoteSpan(android.os.Parcel src)

        mColor = src.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public voiddrawLeadingMargin(android.graphics.Canvas c, android.graphics.Paint p, int x, int dir, int top, int baseline, int bottom, java.lang.CharSequence text, int start, int end, boolean first, android.text.Layout layout)

        Paint.Style style = p.getStyle();
        int color = p.getColor();

        p.setStyle(Paint.Style.FILL);
        p.setColor(mColor);

        c.drawRect(x, top, x + dir * STRIPE_WIDTH, bottom, p);

        p.setStyle(style);
        p.setColor(color);
    
public intgetColor()

        return mColor;
    
public intgetLeadingMargin(boolean first)

        return STRIPE_WIDTH + GAP_WIDTH;
    
public intgetSpanTypeId()

        return TextUtils.QUOTE_SPAN;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeInt(mColor);