Android
android.text.style
public class

android.text.style.TextAppearanceSpan

java.lang.Object
android.text.style.CharacterStyle
android.text.style.MetricAffectingSpan UpdateLayout
android.text.style.TextAppearanceSpan

Sets the text color, size, style, and typeface to match a TextAppearance resource.

Summary

Public Constructors

            TextAppearanceSpan(Context context, int appearance)
Uses the specified TextAppearance resource to determine the text appearance.
            TextAppearanceSpan(Context context, int appearance, int colorList)
Uses the specified TextAppearance resource to determine the text appearance, and the specified text color resource to determine the color.
            TextAppearanceSpan(String family, int style, int size, ColorStateList color, ColorStateList linkColor)
Makes text be drawn with the specified typeface, size, style, and colors.

Public Methods

          String  getFamily()
Returns the typeface family specified by this span, or null if it does not specify one.
          ColorStateList  getLinkTextColor()
Returns the link color specified by this span, or null if it does not specify one.
          ColorStateList  getTextColor()
Returns the text color specified by this span, or null if it does not specify one.
          int  getTextSize()
Returns the text size specified by this span, or -1 if it does not specify one.
          int  getTextStyle()
Returns the text style specified by this span, or 0 if it does not specify one.
          void  updateDrawState(TextPaint ds)
          void  updateMeasureState(TextPaint ds)
Methods inherited from class android.text.style.MetricAffectingSpan
Methods inherited from class android.text.style.CharacterStyle
Methods inherited from class java.lang.Object

Details

Public Constructors

public TextAppearanceSpan(Context context, int appearance)

Uses the specified TextAppearance resource to determine the text appearance. The appearance should be, for example, android.R.style.TextAppearance_Small.

public TextAppearanceSpan(Context context, int appearance, int colorList)

Uses the specified TextAppearance resource to determine the text appearance, and the specified text color resource to determine the color. The appearance should be, for example, android.R.style.TextAppearance_Small, and the colorList should be, for example, android.R.styleable.Theme_textColorDim.

public TextAppearanceSpan(String family, int style, int size, ColorStateList color, ColorStateList linkColor)

Makes text be drawn with the specified typeface, size, style, and colors.

Public Methods

public String getFamily()

Returns the typeface family specified by this span, or null if it does not specify one.

public ColorStateList getLinkTextColor()

Returns the link color specified by this span, or null if it does not specify one.

public ColorStateList getTextColor()

Returns the text color specified by this span, or null if it does not specify one.

public int getTextSize()

Returns the text size specified by this span, or -1 if it does not specify one.

public int getTextStyle()

Returns the text style specified by this span, or 0 if it does not specify one.

public void updateDrawState(TextPaint ds)

public void updateMeasureState(TextPaint ds)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48