Package icyllis.modernui.text.style
Class SubscriptSpan
java.lang.Object
icyllis.modernui.text.style.CharacterStyle
icyllis.modernui.text.style.MetricAffectingSpan
icyllis.modernui.text.style.SubscriptSpan
- All Implemented Interfaces:
icyllis.modernui.text.ParcelableSpan,UpdateAppearance,UpdateLayout,Parcelable,Cloneable
public class SubscriptSpan
extends MetricAffectingSpan
implements icyllis.modernui.text.ParcelableSpan
The span that moves the position of the text baseline lower.
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 aSubscriptSpan.SubscriptSpan(Parcel src) Creates aSubscriptSpanfrom 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
-
SubscriptSpan
public SubscriptSpan()Creates aSubscriptSpan. -
SubscriptSpan
Creates aSubscriptSpanfrom 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
-