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
  • 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

      public Standard(@NonNull Parcel src)
  • Method Details

    • getSpanTypeId

      public int getSpanTypeId()
      Description copied from interface: ParcelableSpan
      Return a special type identifier for this span class.
      Specified by:
      getSpanTypeId in interface ParcelableSpan
    • writeToParcel

      public void writeToParcel(@NonNull Parcel dest, int flags)
      Description copied from interface: Parcelable
      The subclass implements the method to flatten its contents by calling the methods of Parcel for its primitive values.
      Specified by:
      writeToParcel in interface Parcelable
      Parameters:
      dest - the parcel to write the object's data to
      flags - 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 interface TrailingMarginSpan
      Returns:
      the offset for the margin.