QuoteSpanpublic 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 int | describeContents()
return 0;
| public void | drawLeadingMargin(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 int | getColor()
return mColor;
| public int | getLeadingMargin(boolean first)
return STRIPE_WIDTH + GAP_WIDTH;
| public int | getSpanTypeId()
return TextUtils.QUOTE_SPAN;
| public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeInt(mColor);
|
|