Added in API level 1

MetricAffectingSpan

public abstract class MetricAffectingSpan
extends CharacterStyle implements UpdateLayout

java.lang.Object
   ↳ android.text.style.CharacterStyle
     ↳ android.text.style.MetricAffectingSpan


The classes that affect character-level text formatting in a way that changes the width or height of characters extend this class.

Summary

Public constructors

MetricAffectingSpan()

Public methods

MetricAffectingSpan getUnderlying()

Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated by CharacterStyle.wrap(CharacterStyle), returns the underlying MetricAffectingSpan.

abstract void updateMeasureState(TextPaint textPaint)

Classes that extend MetricAffectingSpan implement this method to update the text formatting in a way that can change the width or height of characters.

Inherited methods

Public constructors

MetricAffectingSpan

public MetricAffectingSpan ()

Public methods

getUnderlying

Added in API level 1
public MetricAffectingSpan getUnderlying ()

Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated by CharacterStyle.wrap(CharacterStyle), returns the underlying MetricAffectingSpan.

Returns
MetricAffectingSpan

updateMeasureState

Added in API level 1
public abstract void updateMeasureState (TextPaint textPaint)

Classes that extend MetricAffectingSpan implement this method to update the text formatting in a way that can change the width or height of characters.

Parameters
textPaint TextPaint: the paint used for drawing the text This value cannot be null.