Package icyllis.modernui.text.style
Class TrailingMarginSpan.Standard
java.lang.Object
icyllis.modernui.text.style.TrailingMarginSpan.Standard
- All Implemented Interfaces:
ParcelableSpan
,ParagraphStyle
,TrailingMarginSpan
,Parcelable
- Enclosing interface:
TrailingMarginSpan
public static class TrailingMarginSpan.Standard
extends Object
implements TrailingMarginSpan, ParcelableSpan
-
Nested Class Summary
Nested classes/interfaces inherited from interface icyllis.modernui.util.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>, Parcelable.WriteFlags
Nested classes/interfaces inherited from interface icyllis.modernui.text.style.TrailingMarginSpan
TrailingMarginSpan.Standard
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return a special type identifier for this span class.int
Returns the amount by which to adjust the trailing margin.void
writeToParcel
(Parcel dest, int flags) The subclass implements the method to flatten its contents by calling the methods ofParcel
for its primitive values.
-
Constructor Details
-
Standard
public Standard(int trailing) Constructor taking an indent for the trailing margin.- Parameters:
trailing
- the indent for the trailing edge of the paragraph
-
Standard
-
-
Method Details
-
getSpanTypeId
public int getSpanTypeId()Description copied from interface:ParcelableSpan
Return a special type identifier for this span class.- Specified by:
getSpanTypeId
in interfaceParcelableSpan
-
writeToParcel
Description copied from interface:Parcelable
The subclass implements the method to flatten its contents by calling the methods ofParcel
for its primitive values.- Specified by:
writeToParcel
in interfaceParcelable
- Parameters:
dest
- the parcel to write the object's data toflags
- the flags about how the object should be written
-
getTrailingMargin
public int getTrailingMargin()Description copied from interface:TrailingMarginSpan
Returns the amount by which to adjust the trailing margin. Positive values move away from the trailing edge of the paragraph, negative values move towards it.The trailing margin is on the right for lines in a left-to-right paragraph, and on the left for lines in a right-to-left paragraph.
- Specified by:
getTrailingMargin
in interfaceTrailingMarginSpan
- Returns:
- the offset for the margin.
-