Added in API level 1

DynamicLayout

open class DynamicLayout : Layout
kotlin.Any
   ↳ android.text.Layout
   ↳ android.text.DynamicLayout

DynamicLayout is a text layout that updates itself as the text is edited.

This is used by widgets to control text layout. You should not need to use this class directly unless you are implementing your own widget or custom display object, or need to call Canvas.drawText() directly.

Summary

Nested classes

Builder for dynamic layouts.

Inherited constants
Public constructors
DynamicLayout(base: CharSequence, paint: TextPaint, width: Int, align: Layout.Alignment, spacingmult: Float, spacingadd: Float, includepad: Boolean)

DynamicLayout(base: CharSequence, display: CharSequence, paint: TextPaint, width: Int, align: Layout.Alignment, spacingmult: Float, spacingadd: Float, includepad: Boolean)

DynamicLayout(base: CharSequence, display: CharSequence, paint: TextPaint, width: Int, align: Layout.Alignment, spacingmult: Float, spacingadd: Float, includepad: Boolean, ellipsize: TextUtils.TruncateAt?, ellipsizedWidth: Int)

Public methods
open Int

open Int

open Int

open Int

open Boolean

open Int

open Int

Layout.Directions!

open Int

open Int
getLineTop(line: Int)

open Int

open Int

Inherited functions
Inherited properties

Public constructors

DynamicLayout

Added in API level 1
DynamicLayout(
    base: CharSequence,
    paint: TextPaint,
    width: Int,
    align: Layout.Alignment,
    spacingmult: Float,
    spacingadd: Float,
    includepad: Boolean)

Deprecated: Use Builder instead.

Parameters
base CharSequence: This value cannot be null.
paint TextPaint: This value cannot be null.
width Int: Value is 0 or greater
align Layout.Alignment: This value cannot be null.
spacingmult Float: Value is 0.0 or greater

DynamicLayout

Added in API level 1
DynamicLayout(
    base: CharSequence,
    display: CharSequence,
    paint: TextPaint,
    width: Int,
    align: Layout.Alignment,
    spacingmult: Float,
    spacingadd: Float,
    includepad: Boolean)

Deprecated: Use Builder instead.

Parameters
base CharSequence: This value cannot be null.
display CharSequence: This value cannot be null.
paint TextPaint: This value cannot be null.
width Int: Value is 0 or greater
align Layout.Alignment: This value cannot be null.
spacingmult Float: Value is 0.0 or greater

DynamicLayout

Added in API level 1
DynamicLayout(
    base: CharSequence,
    display: CharSequence,
    paint: TextPaint,
    width: Int,
    align: Layout.Alignment,
    spacingmult: Float,
    spacingadd: Float,
    includepad: Boolean,
    ellipsize: TextUtils.TruncateAt?,
    ellipsizedWidth: Int)

Deprecated: Use Builder instead.

Parameters
base CharSequence: This value cannot be null.
display CharSequence: This value cannot be null.
paint TextPaint: This value cannot be null.
width Int: Value is 0 or greater
align Layout.Alignment: This value cannot be null.
spacingmult Float: Value is 0.0 or greater
ellipsize TextUtils.TruncateAt?: This value may be null.
ellipsizedWidth Int: Value is 0 or greater

Public methods

getBottomPadding

Added in API level 1
open fun getBottomPadding(): Int

getEllipsisCount

Added in API level 1
open fun getEllipsisCount(line: Int): Int

getEllipsisStart

Added in API level 1
open fun getEllipsisStart(line: Int): Int

getEllipsizedWidth

Added in API level 1
open fun getEllipsizedWidth(): Int
Return
Int the amount of ellipsized width in pixels. Value is 0 or greater

getLineContainsTab

Added in API level 1
open fun getLineContainsTab(line: Int): Boolean

getLineCount

Added in API level 1
open fun getLineCount(): Int

getLineDescent

Added in API level 1
open fun getLineDescent(line: Int): Int

getLineDirections

Added in API level 1
fun getLineDirections(line: Int): Layout.Directions!

getLineStart

Added in API level 1
open fun getLineStart(line: Int): Int

getLineTop

Added in API level 1
open fun getLineTop(line: Int): Int

getParagraphDirection

Added in API level 1
open fun getParagraphDirection(line: Int): Int

getTopPadding

Added in API level 1
open fun getTopPadding(): Int