Added in API level 1

Standard

open class Standard : LeadingMarginSpan, ParcelableSpan
kotlin.Any
   ↳ android.text.style.LeadingMarginSpan.Standard

The standard implementation of LeadingMarginSpan, which adjusts the margin but does not do any rendering.

Summary

Public constructors
Standard(first: Int, rest: Int)

Constructor taking separate indents for the first and subsequent lines.

Standard(every: Int)

Constructor taking an indent for all lines.

Public methods
open Int

open Unit
drawLeadingMargin(c: Canvas!, p: Paint!, x: Int, dir: Int, top: Int, baseline: Int, bottom: Int, text: CharSequence!, start: Int, end: Int, first: Boolean, layout: Layout!)

open Int

open Int

open Unit
writeToParcel(dest: Parcel, flags: Int)

Public constructors

Standard

Added in API level 1
Standard(
    first: Int,
    rest: Int)

Constructor taking separate indents for the first and subsequent lines.

Parameters
first Int: the indent for the first line of the paragraph
rest Int: the indent for the remaining lines of the paragraph

Standard

Added in API level 1
Standard(every: Int)

Constructor taking an indent for all lines.

Parameters
every Int: the indent of each line

Standard

Added in API level 1
Standard(src: Parcel!)

Public methods

describeContents

Added in API level 3
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

drawLeadingMargin

Added in API level 1
open fun drawLeadingMargin(
    c: Canvas!,
    p: Paint!,
    x: Int,
    dir: Int,
    top: Int,
    baseline: Int,
    bottom: Int,
    text: CharSequence!,
    start: Int,
    end: Int,
    first: Boolean,
    layout: Layout!
): Unit
Parameters
c Canvas!: the canvas
p Paint!: the paint. The this should be left unchanged on exit.
x Int: the current position of the margin
dir Int: the base direction of the paragraph; if negative, the margin is to the right of the text, otherwise it is to the left.
top Int: the top of the line
baseline Int: the baseline of the line
bottom Int: the bottom of the line
text CharSequence!: the text
start Int: the start of the line
end Int: the end of the line
first Boolean: true if this is the first line of its paragraph
layout Layout!: the layout containing this line

getLeadingMargin

Added in API level 1
open fun getLeadingMargin(first: Boolean): Int
Parameters
first Boolean: true if the request is for the first line of a paragraph, false for subsequent lines
Return
Int the offset for the margin.

getSpanTypeId

Added in API level 3
open fun getSpanTypeId(): Int

writeToParcel

Added in API level 3
open fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES