public class CustomStyleSpan
extends android.text.style.MetricAffectingSpan
| Constructor and Description |
|---|
CustomStyleSpan(int fontStyle,
int fontWeight,
java.lang.String fontFamily,
android.content.res.AssetManager assetManager) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFontFamily()
Returns the font family set for this StyleSpan.
|
int |
getStyle()
Returns
Typeface.NORMAL or Typeface.ITALIC. |
int |
getWeight()
Returns
Typeface.NORMAL or Typeface.BOLD. |
void |
updateDrawState(android.text.TextPaint ds) |
void |
updateMeasureState(android.text.TextPaint paint) |
public CustomStyleSpan(int fontStyle,
int fontWeight,
@Nullable
java.lang.String fontFamily,
android.content.res.AssetManager assetManager)
public void updateDrawState(android.text.TextPaint ds)
updateDrawState in class android.text.style.CharacterStylepublic void updateMeasureState(android.text.TextPaint paint)
updateMeasureState in class android.text.style.MetricAffectingSpanpublic int getStyle()
Typeface.NORMAL or Typeface.ITALIC.public int getWeight()
Typeface.NORMAL or Typeface.BOLD.@Nullable public java.lang.String getFontFamily()