Package icyllis.modernui.text.style
Class SuperscriptSpan
java.lang.Object
icyllis.modernui.text.style.CharacterStyle
icyllis.modernui.text.style.MetricAffectingSpan
icyllis.modernui.text.style.SuperscriptSpan
- All Implemented Interfaces:
icyllis.modernui.text.ParcelableSpan,UpdateAppearance,UpdateLayout,Parcelable,Cloneable
public class SuperscriptSpan
extends MetricAffectingSpan
implements icyllis.modernui.text.ParcelableSpan
The span that moves the position of the text baseline higher.
Unlike Android, this Span also affects the relative text size.
-
Nested Class Summary
Nested classes/interfaces inherited from interface icyllis.modernui.util.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>, Parcelable.WriteFlags -
Constructor Summary
ConstructorsConstructorDescriptionCreates aSuperscriptSpan.SuperscriptSpan(Parcel src) Creates aSuperscriptSpanfrom a parcel. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyBaselineShift(TextPaint textPaint) intReturn a special type identifier for this span class.toString()voidupdateMeasureState(TextPaint textPaint) Classes that extendMetricAffectingSpanimplement this method to update the text formatting in a way that can change the width or height of characters.voidwriteToParcel(Parcel dest, int flags) The subclass implements the method to flatten its contents by calling the methods ofParcelfor its primitive values.Methods inherited from class icyllis.modernui.text.style.MetricAffectingSpan
updateDrawStateMethods inherited from class icyllis.modernui.text.style.CharacterStyle
clone, wrap
-
Constructor Details
-
SuperscriptSpan
public SuperscriptSpan()Creates aSuperscriptSpan. -
SuperscriptSpan
Creates aSuperscriptSpanfrom a parcel.
-
-
Method Details
-
getSpanTypeId
public int getSpanTypeId()Return a special type identifier for this span class.- Specified by:
getSpanTypeIdin interfaceicyllis.modernui.text.ParcelableSpan
-
writeToParcel
Description copied from interface:ParcelableThe subclass implements the method to flatten its contents by calling the methods ofParcelfor its primitive values.- Specified by:
writeToParcelin interfaceParcelable- Parameters:
dest- the parcel to write the object's data toflags- the flags about how the object should be written
-
updateMeasureState
Description copied from class:MetricAffectingSpanClasses that extendMetricAffectingSpanimplement this method to update the text formatting in a way that can change the width or height of characters.- Specified by:
updateMeasureStatein classMetricAffectingSpan- Parameters:
textPaint- the paint used for measuring the text
-
applyBaselineShift
-
toString
-