Build 1.0_r1(from source)

android.text.style
Class StyleSpan

java.lang.Object
  extended by android.text.style.CharacterStyle
      extended by android.text.style.MetricAffectingSpan
          extended by android.text.style.StyleSpan
All Implemented Interfaces:
UpdateLayout

public class StyleSpan
extends MetricAffectingSpan

Describes a style in a span. Note that styles are cumulative -- if both bold and italic are set in separate spans, or if the base style is bold and a span calls for italic, you get bold italic. You can't turn off a style from the base style.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.text.style.MetricAffectingSpan
MetricAffectingSpan.Passthrough
 
Constructor Summary
StyleSpan(int style)
           
 
Method Summary
 int getStyle()
          Returns the style constant defined in Typeface.
 void updateDrawState(TextPaint ds)
           
 void updateMeasureState(TextPaint paint)
           
 
Methods inherited from class android.text.style.MetricAffectingSpan
getUnderlying
 
Methods inherited from class android.text.style.CharacterStyle
wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleSpan

public StyleSpan(int style)
Parameters:
style - An integer constant describing the style for this span. Examples include bold, italic, and normal. Values are constants defined in Typeface.
Method Detail

getStyle

public int getStyle()
Returns the style constant defined in Typeface.


updateDrawState

public void updateDrawState(TextPaint ds)
Specified by:
updateDrawState in class CharacterStyle

updateMeasureState

public void updateMeasureState(TextPaint paint)
Specified by:
updateMeasureState in class MetricAffectingSpan

Build 1.0_r1(from source)

Please submit a feedback, bug or feature