Class MetricAffectingSpan

java.lang.Object
icyllis.modernui.text.style.CharacterStyle
icyllis.modernui.text.style.MetricAffectingSpan
All Implemented Interfaces:
UpdateAppearance, UpdateLayout, Cloneable
Direct Known Subclasses:
AbsoluteSizeSpan, CodeBlockSpan, CodeSpan, HeadingSpan, LocaleSpan, RelativeSizeSpan, ReplacementSpan, StyleSpan, SubscriptSpan, SuperscriptSpan, TypefaceSpan

public abstract class MetricAffectingSpan extends CharacterStyle implements UpdateLayout
The classes that affect character-level text formatting in a way that changes the metric of characters extend this class.
  • Constructor Details

    • MetricAffectingSpan

      public MetricAffectingSpan()
  • Method Details

    • updateDrawState

      public void updateDrawState(@NonNull TextPaint paint)
      Specified by:
      updateDrawState in class CharacterStyle
    • updateMeasureState

      public abstract void updateMeasureState(@NonNull TextPaint paint)
      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:
      paint - the paint used for measuring the text