AbsoluteSizeSpanpublic class AbsoluteSizeSpan extends MetricAffectingSpan implements android.text.ParcelableSpan
Fields Summary |
---|
private final int | mSize | private boolean | mDip |
Constructors Summary |
---|
public AbsoluteSizeSpan(int size)Set the text size to size physical pixels.
mSize = size;
| public AbsoluteSizeSpan(int size, boolean dip)Set the text size to size physical pixels,
or to size device-independent pixels if
dip is true.
mSize = size;
mDip = dip;
| public AbsoluteSizeSpan(android.os.Parcel src)
mSize = src.readInt();
mDip = src.readInt() != 0;
|
Methods Summary |
---|
public int | describeContents()
return 0;
| public boolean | getDip()
return mDip;
| public int | getSize()
return mSize;
| public int | getSpanTypeId()
return TextUtils.ABSOLUTE_SIZE_SPAN;
| public void | updateDrawState(android.text.TextPaint ds)
if (mDip) {
ds.setTextSize(mSize * ds.density);
} else {
ds.setTextSize(mSize);
}
| public void | updateMeasureState(android.text.TextPaint ds)
if (mDip) {
ds.setTextSize(mSize * ds.density);
} else {
ds.setTextSize(mSize);
}
| public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeInt(mSize);
dest.writeInt(mDip ? 1 : 0);
|
|