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 |
getEllipsisCount(line: Int) |
open Int |
getEllipsisStart(line: Int) |
open Int | |
open Boolean |
getLineContainsTab(line: Int) |
open Int | |
open Int |
getLineDescent(line: Int) |
Layout.Directions! |
getLineDirections(line: Int) |
open Int |
getLineStart(line: Int) |
open Int |
getLineTop(line: Int) |
open Int |
getParagraphDirection(line: 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
getEllipsizedWidth
Added in API level 1
open fun getEllipsizedWidth(): Int
Return | |
---|---|
Int |
the amount of ellipsized width in pixels. Value is 0 or greater |