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

added in API level 1
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 must never be null.