Added in API level 1

MetricAffectingSpan


abstract class MetricAffectingSpan : CharacterStyle, UpdateLayout
kotlin.Any
   ↳ 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

Public methods
open MetricAffectingSpan!

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

abstract Unit

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 functions

Public constructors

MetricAffectingSpan

MetricAffectingSpan()

Public methods

getUnderlying

Added in API level 1
open fun getUnderlying(): MetricAffectingSpan!

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

updateMeasureState

Added in API level 1
abstract fun updateMeasureState(textPaint: TextPaint): Unit

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.