Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/text/Layout#nestedclasses) \| [Constants](https://developer.android.com/reference/android/text/Layout#constants) \| [Fields](https://developer.android.com/reference/android/text/Layout#lfields) \| [Protected Ctors](https://developer.android.com/reference/android/text/Layout#proctors) \| [Methods](https://developer.android.com/reference/android/text/Layout#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/text/Layout#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/text/Layout#inhmethods)

# Layout

*** ** * ** ***


`
public


abstract
class
Layout
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.text.Layout |

|---|
| Known direct subclasses [BoringLayout](https://developer.android.com/reference/android/text/BoringLayout), [DynamicLayout](https://developer.android.com/reference/android/text/DynamicLayout), [StaticLayout](https://developer.android.com/reference/android/text/StaticLayout) |---|---| | [BoringLayout](https://developer.android.com/reference/android/text/BoringLayout) | A BoringLayout is a very simple Layout implementation for text that fits on a single line and is all left-to-right characters. | | [DynamicLayout](https://developer.android.com/reference/android/text/DynamicLayout) | DynamicLayout is a text layout that updates itself as the text is edited. | | [StaticLayout](https://developer.android.com/reference/android/text/StaticLayout) | StaticLayout is a Layout for text that will not be edited after it is laid out. | |

<br />

*** ** * ** ***

A base class that manages text layout in visual elements on
the screen.

For text that will be edited, use a `https://developer.android.com/reference/android/text/DynamicLayout`,
which will be updated as the text changes.
For text that will not change, use a `https://developer.android.com/reference/android/text/StaticLayout`.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/text/Layout.Builder` A builder class for Layout object. |
| ` class` | `https://developer.android.com/reference/android/text/Layout.Directions` Stores information about bidirectional (left-to-right or right-to-left) text within the layout of a line. |
| ` interface` | `https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy` Strategy for determining whether a text segment is inside a rectangle area. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_BALANCED` Value for break strategy indicating balanced line breaking. |
| `int` | `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_HIGH_QUALITY` Value for break strategy indicating high quality line breaking, including automatic hyphenation and doing whole-paragraph optimization of line breaks. |
| `int` | `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_SIMPLE` Value for break strategy indicating simple line breaking. |
| `float` | `https://developer.android.com/reference/android/text/Layout#DEFAULT_LINESPACING_ADDITION` |
| `float` | `https://developer.android.com/reference/android/text/Layout#DEFAULT_LINESPACING_MULTIPLIER` |
| `int` | `https://developer.android.com/reference/android/text/Layout#DIR_LEFT_TO_RIGHT` |
| `int` | `https://developer.android.com/reference/android/text/Layout#DIR_RIGHT_TO_LEFT` |
| `int` | `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` Value for hyphenation frequency indicating the full amount of automatic hyphenation, typical in typography. |
| `int` | `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL_FAST` Value for hyphenation frequency indicating the full amount of automatic hyphenation with using faster algorithm. |
| `int` | `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE` Value for hyphenation frequency indicating no automatic hyphenation. |
| `int` | `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` Value for hyphenation frequency indicating a light amount of automatic hyphenation, which is a conservative default. |
| `int` | `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL_FAST` Value for hyphenation frequency indicating a light amount of automatic hyphenation with using faster algorithm. |
| `int` | `https://developer.android.com/reference/android/text/Layout#JUSTIFICATION_MODE_INTER_CHARACTER` Value for justification mode indicating the text is justified by stretching letter spacing. |
| `int` | `https://developer.android.com/reference/android/text/Layout#JUSTIFICATION_MODE_INTER_WORD` Value for justification mode indicating the text is justified by stretching word spacing. |
| `int` | `https://developer.android.com/reference/android/text/Layout#JUSTIFICATION_MODE_NONE` Value for justification mode indicating no justification. |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy` | `https://developer.android.com/reference/android/text/Layout#INCLUSION_STRATEGY_ANY_OVERLAP` Strategy which considers a text segment to be inside a rectangle area if the segment bounds intersect the rectangle. |
| ` public static final https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy` | `https://developer.android.com/reference/android/text/Layout#INCLUSION_STRATEGY_CONTAINS_ALL` Strategy which considers a text segment to be inside a rectangle area if the segment bounds are completely contained within the rectangle. |
| ` public static final https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy` | `https://developer.android.com/reference/android/text/Layout#INCLUSION_STRATEGY_CONTAINS_CENTER` Strategy which considers a text segment to be inside a rectangle area if the center of the segment bounds is inside the rectangle. |

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/android/text/Layout#Layout(java.lang.CharSequence,%20android.text.TextPaint,%20int,%20android.text.Layout.Alignment,%20float,%20float)(https://developer.android.com/reference/java/lang/CharSequence text, https://developer.android.com/reference/android/text/TextPaint paint, int width, https://developer.android.com/reference/android/text/Layout.Alignment align, float spacingMult, float spacingAdd) ` Subclasses of Layout use this constructor to set the display text, width, and other standard properties. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/graphics/RectF` | ` https://developer.android.com/reference/android/text/Layout#computeDrawingBoundingBox()() ` Get an actual bounding box that draws text content. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas c) ` Draw this Layout on the specified Canvas. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20android.graphics.Path,%20android.graphics.Paint,%20int)(https://developer.android.com/reference/android/graphics/Canvas canvas, https://developer.android.com/reference/android/graphics/Path selectionHighlight, https://developer.android.com/reference/android/graphics/Paint selectionHighlightPaint, int cursorOffsetVertical) ` Draw this Layout on the specified canvas, with the highlight path drawn between the background and the text. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)(https://developer.android.com/reference/android/graphics/Canvas canvas, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Path> highlightPaths, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Paint> highlightPaints, https://developer.android.com/reference/android/graphics/Path selectionPath, https://developer.android.com/reference/android/graphics/Paint selectionPaint, int cursorOffsetVertical) ` Draw this layout on the specified canvas. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#drawBackground(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas) ` Draw background of this layout. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#drawText(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas) ` Draw text part of this layout. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#fillCharacterBounds(int,%20int,%20float[],%20int)(int start, int end, float[] bounds, int boundsStart) ` Return the characters' bounds in the given range. |
| ` final https://developer.android.com/reference/android/text/Layout.Alignment` | ` https://developer.android.com/reference/android/text/Layout#getAlignment()() ` Returns the alignment used for creating this layout in pixels. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getBottomPadding()() ` Returns the number of extra pixels of descent padding in the bottom line of the Layout. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getBreakStrategy()() ` Return the break strategy used for creating this layout. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#getCursorPath(int,%20android.graphics.Path,%20java.lang.CharSequence)(int point, https://developer.android.com/reference/android/graphics/Path dest, https://developer.android.com/reference/java/lang/CharSequence editingBuffer) ` Fills in the specified Path with a representation of a cursor at the specified offset. |
| ` static float` | ` https://developer.android.com/reference/android/text/Layout#getDesiredWidth(java.lang.CharSequence,%20android.text.TextPaint)(https://developer.android.com/reference/java/lang/CharSequence source, https://developer.android.com/reference/android/text/TextPaint paint) ` Return how wide a layout must be in order to display the specified text with one line per paragraph. |
| ` static float` | ` https://developer.android.com/reference/android/text/Layout#getDesiredWidth(java.lang.CharSequence,%20int,%20int,%20android.text.TextPaint)(https://developer.android.com/reference/java/lang/CharSequence source, int start, int end, https://developer.android.com/reference/android/text/TextPaint paint) ` Return how wide a layout must be in order to display the specified text slice with one line per paragraph. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getEllipsisCount(int)(int line) ` Returns the number of characters to be ellipsized away, or 0 if no ellipsis is to take place. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getEllipsisStart(int)(int line) ` Return the offset of the first character to be ellipsized away, relative to the start of the line. |
| ` final https://developer.android.com/reference/android/text/TextUtils.TruncateAt` | ` https://developer.android.com/reference/android/text/Layout#getEllipsize()() ` Return the ellipsize option used for creating this layout. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getEllipsizedWidth()() ` Return the width to which this layout is ellipsized. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getHeight()() ` Return the total height of this layout. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getHyphenationFrequency()() ` Return the hyphenation frequency used for creating this layout. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getJustificationMode()() ` Return the justification mode used for creating this layout. |
| ` final int[]` | ` https://developer.android.com/reference/android/text/Layout#getLeftIndents()() ` Return a copy of the left indents used for this layout. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getLineAscent(int)(int line) ` Get the ascent of the text on the specified line. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getLineBaseline(int)(int line) ` Return the vertical position of the baseline of the specified line. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineBottom(int,%20boolean)(int line, boolean includeLineSpacing) ` Return the vertical position of the bottom of the specified line. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getLineBottom(int)(int line) ` Return the vertical position of the bottom of the specified line. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineBounds(int,%20android.graphics.Rect)(int line, https://developer.android.com/reference/android/graphics/Rect bounds) ` Return the baseline for the specified line (0...getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it. |
| ` https://developer.android.com/reference/android/graphics/text/LineBreakConfig` | ` https://developer.android.com/reference/android/text/Layout#getLineBreakConfig()() ` Gets the `https://developer.android.com/reference/android/graphics/text/LineBreakConfig` used for creating this layout. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/text/Layout#getLineContainsTab(int)(int line) ` Returns whether the specified line contains one or more characters that need to be handled specially, like tabs. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getLineCount()() ` Return the number of lines of text in this layout. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getLineDescent(int)(int line) ` Return the descent of the specified line(0...getLineCount() - 1). |
| ` abstract https://developer.android.com/reference/android/text/Layout.Directions` | ` https://developer.android.com/reference/android/text/Layout#getLineDirections(int)(int line) ` Returns the directional run information for the specified line. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getLineEnd(int)(int line) ` Return the text offset after the last character on the specified line. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineForOffset(int)(int offset) ` Get the line number on which the specified text offset appears. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineForVertical(int)(int vertical) ` Get the line number corresponding to the specified vertical position. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getLineLeft(int)(int line) ` Get the leftmost position that should be exposed for horizontal scrolling on the specified line. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineLetterSpacingUnitCount(int,%20boolean)(int line, boolean includeTrailingWhitespace) ` Returns the number of letter spacing unit in the line. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getLineMax(int)(int line) ` Gets the unsigned horizontal extent of the specified line, including leading margin indent, but excluding trailing whitespace. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getLineRight(int)(int line) ` Get the rightmost position that should be exposed for horizontal scrolling on the specified line. |
| ` final float` | ` https://developer.android.com/reference/android/text/Layout#getLineSpacingAmount()() ` Returns the amount added to the line height. |
| ` final float` | ` https://developer.android.com/reference/android/text/Layout#getLineSpacingMultiplier()() ` Returns the multiplier applied to the line height. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getLineStart(int)(int line) ` Return the text offset of the beginning of the specified line ( 0...getLineCount()). |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getLineTop(int)(int line) ` Return the vertical position of the top of the specified line (0...getLineCount()). |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getLineVisibleEnd(int)(int line) ` Return the text offset after the last visible character (so whitespace is not counted) on the specified line. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getLineWidth(int)(int line) ` Gets the unsigned horizontal extent of the specified line, including leading margin indent and trailing whitespace. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getMaxLines()() ` Return the maximum lines allowed used for creating this layout. |
| ` https://developer.android.com/reference/android/graphics/Paint.FontMetrics` | ` https://developer.android.com/reference/android/text/Layout#getMinimumFontMetrics()() ` Get the minimum font metrics used for line spacing. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getOffsetForHorizontal(int,%20float)(int line, float horiz) ` Get the character offset on the specified line whose position is closest to the specified horizontal position. |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getOffsetToLeftOf(int)(int offset) ` |
| ` int` | ` https://developer.android.com/reference/android/text/Layout#getOffsetToRightOf(int)(int offset) ` |
| ` final https://developer.android.com/reference/android/text/TextPaint` | ` https://developer.android.com/reference/android/text/Layout#getPaint()() ` Return the paint used for creating this layout. |
| ` final https://developer.android.com/reference/android/text/Layout.Alignment` | ` https://developer.android.com/reference/android/text/Layout#getParagraphAlignment(int)(int line) ` Get the alignment of the specified paragraph, taking into account markup attached to it. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getParagraphDirection(int)(int line) ` Returns the primary directionality of the paragraph containing the specified line, either 1 for left-to-right lines, or -1 for right-to-left lines (see `https://developer.android.com/reference/android/text/Layout#DIR_LEFT_TO_RIGHT`, `https://developer.android.com/reference/android/text/Layout#DIR_RIGHT_TO_LEFT`). |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getParagraphLeft(int)(int line) ` Get the left edge of the specified paragraph, inset by left margins. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getParagraphRight(int)(int line) ` Get the right edge of the specified paragraph, inset by right margins. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getPrimaryHorizontal(int)(int offset) ` Get the primary horizontal position for the specified text offset. |
| ` int[]` | ` https://developer.android.com/reference/android/text/Layout#getRangeForRect(android.graphics.RectF,%20android.text.SegmentFinder,%20android.text.Layout.TextInclusionStrategy)(https://developer.android.com/reference/android/graphics/RectF area, https://developer.android.com/reference/android/text/SegmentFinder segmentFinder, https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy inclusionStrategy) ` Finds the range of text which is inside the specified rectangle area. |
| ` final int[]` | ` https://developer.android.com/reference/android/text/Layout#getRightIndents()() ` Return a copy of the right indents used for this layout. |
| ` float` | ` https://developer.android.com/reference/android/text/Layout#getSecondaryHorizontal(int)(int offset) ` Get the secondary horizontal position for the specified text offset. |
| ` void` | ` https://developer.android.com/reference/android/text/Layout#getSelectionPath(int,%20int,%20android.graphics.Path)(int start, int end, https://developer.android.com/reference/android/graphics/Path dest) ` Fills in the specified Path with a representation of a highlight between the specified offsets. |
| ` boolean` | ` https://developer.android.com/reference/android/text/Layout#getShiftDrawingOffsetForStartOverhang()() ` Returns true if shifting drawing offset for start overhang. |
| ` final float` | ` https://developer.android.com/reference/android/text/Layout#getSpacingAdd()() ` Returns the amount added to the line height. |
| ` final float` | ` https://developer.android.com/reference/android/text/Layout#getSpacingMultiplier()() ` Returns the multiplier applied to the line height. |
| ` final https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/text/Layout#getText()() ` Return the text used for creating this layout. |
| ` final https://developer.android.com/reference/android/text/TextDirectionHeuristic` | ` https://developer.android.com/reference/android/text/Layout#getTextDirectionHeuristic()() ` Returns the text direction heuristic used for creating this layout. |
| ` abstract int` | ` https://developer.android.com/reference/android/text/Layout#getTopPadding()() ` Returns the (negative) number of extra pixels of ascent padding in the top line of the Layout. |
| ` boolean` | ` https://developer.android.com/reference/android/text/Layout#getUseBoundsForWidth()() ` Returns true if using bounding box as a width, false for using advance as a width. |
| ` final int` | ` https://developer.android.com/reference/android/text/Layout#getWidth()() ` Return the width used for creating this layout in pixels. |
| ` final void` | ` https://developer.android.com/reference/android/text/Layout#increaseWidthTo(int)(int wid) ` Increase the width of this layout to the specified width. |
| ` boolean` | ` https://developer.android.com/reference/android/text/Layout#isFallbackLineSpacingEnabled()() ` Return true if the fallback line space is enabled in this Layout. |
| ` final boolean` | ` https://developer.android.com/reference/android/text/Layout#isFontPaddingIncluded()() ` Returns true if this layout is created with increased line height. |
| ` boolean` | ` https://developer.android.com/reference/android/text/Layout#isRtlCharAt(int)(int offset) ` Returns true if the character at offset is right to left (RTL). |

| ### Protected methods ||
|---|---|
| ` final boolean` | ` https://developer.android.com/reference/android/text/Layout#isSpanned()() ` |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### BREAK_STRATEGY_BALANCED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int BREAK_STRATEGY_BALANCED
```

Value for break strategy indicating balanced line breaking. The breaks are chosen to
make all lines as close to the same length as possible, including automatic hyphenation.

<br />

Constant Value:

2
(0x00000002)


### BREAK_STRATEGY_HIGH_QUALITY

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int BREAK_STRATEGY_HIGH_QUALITY
```

Value for break strategy indicating high quality line breaking, including automatic
hyphenation and doing whole-paragraph optimization of line breaks.

<br />

Constant Value:

1
(0x00000001)


### BREAK_STRATEGY_SIMPLE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int BREAK_STRATEGY_SIMPLE
```

Value for break strategy indicating simple line breaking. Automatic hyphens are not added
(though soft hyphens are respected), and modifying text generally doesn't affect the layout
before it (which yields a more consistent user experience when editing), but layout may not
be the highest quality.

<br />

Constant Value:

0
(0x00000000)


### DEFAULT_LINESPACING_ADDITION

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float DEFAULT_LINESPACING_ADDITION
```

<br />

<br />

Constant Value:

0.0


### DEFAULT_LINESPACING_MULTIPLIER

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float DEFAULT_LINESPACING_MULTIPLIER
```

<br />

<br />

Constant Value:

1.0


### DIR_LEFT_TO_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DIR_LEFT_TO_RIGHT
```

<br />

<br />

Constant Value:

1
(0x00000001)


### DIR_RIGHT_TO_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DIR_RIGHT_TO_LEFT
```

<br />

<br />

Constant Value:

-1
(0xffffffff)


### HYPHENATION_FREQUENCY_FULL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HYPHENATION_FREQUENCY_FULL
```

Value for hyphenation frequency indicating the full amount of automatic hyphenation, typical
in typography. Useful for running text and where it's important to put the maximum amount of
text in a screen with limited space.

<br />

Constant Value:

2
(0x00000002)


### HYPHENATION_FREQUENCY_FULL_FAST

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HYPHENATION_FREQUENCY_FULL_FAST
```

Value for hyphenation frequency indicating the full amount of automatic hyphenation with
using faster algorithm.

This option is useful for running text and where it's important to put the maximum amount of
text in a screen with limited space. To make text rendering faster with hyphenation, this
algorithm ignores some hyphen character related typographic features, e.g. kerning.

<br />

Constant Value:

4
(0x00000004)


### HYPHENATION_FREQUENCY_NONE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HYPHENATION_FREQUENCY_NONE
```

Value for hyphenation frequency indicating no automatic hyphenation. Useful
for backward compatibility, and for cases where the automatic hyphenation algorithm results
in incorrect hyphenation. Mid-word breaks may still happen when a word is wider than the
layout and there is otherwise no valid break. Soft hyphens are ignored and will not be used
as suggestions for potential line breaks.

<br />

Constant Value:

0
(0x00000000)


### HYPHENATION_FREQUENCY_NORMAL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HYPHENATION_FREQUENCY_NORMAL
```

Value for hyphenation frequency indicating a light amount of automatic hyphenation, which
is a conservative default. Useful for informal cases, such as short sentences or chat
messages.

<br />

Constant Value:

1
(0x00000001)


### HYPHENATION_FREQUENCY_NORMAL_FAST

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HYPHENATION_FREQUENCY_NORMAL_FAST
```

Value for hyphenation frequency indicating a light amount of automatic hyphenation with
using faster algorithm.

This option is useful for informal cases, such as short sentences or chat messages. To make
text rendering faster with hyphenation, this algorithm ignores some hyphen character related
typographic features, e.g. kerning.

<br />

Constant Value:

3
(0x00000003)


### JUSTIFICATION_MODE_INTER_CHARACTER

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int JUSTIFICATION_MODE_INTER_CHARACTER
```

Value for justification mode indicating the text is justified by stretching letter spacing.

<br />

Constant Value:

2
(0x00000002)


### JUSTIFICATION_MODE_INTER_WORD

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int JUSTIFICATION_MODE_INTER_WORD
```

Value for justification mode indicating the text is justified by stretching word spacing.

<br />

Constant Value:

1
(0x00000001)


### JUSTIFICATION_MODE_NONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int JUSTIFICATION_MODE_NONE
```

Value for justification mode indicating no justification.

<br />

Constant Value:

0
(0x00000000)


## Fields

### INCLUSION_STRATEGY_ANY_OVERLAP

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Layout.TextInclusionStrategy INCLUSION_STRATEGY_ANY_OVERLAP
```

Strategy which considers a text segment to be inside a rectangle area if the segment bounds
intersect the rectangle.

<br />

### INCLUSION_STRATEGY_CONTAINS_ALL

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Layout.TextInclusionStrategy INCLUSION_STRATEGY_CONTAINS_ALL
```

Strategy which considers a text segment to be inside a rectangle area if the segment bounds
are completely contained within the rectangle.

<br />

### INCLUSION_STRATEGY_CONTAINS_CENTER

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Layout.TextInclusionStrategy INCLUSION_STRATEGY_CONTAINS_CENTER
```

Strategy which considers a text segment to be inside a rectangle area if the center of the
segment bounds is inside the rectangle.

<br />

## Protected constructors

### Layout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected Layout (CharSequence text, 
                TextPaint paint, 
                int width, 
                Layout.Alignment align, 
                float spacingMult, 
                float spacingAdd)
```

Subclasses of Layout use this constructor to set the display text,
width, and other standard properties.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: the text to render <br /> |
| `paint` | `TextPaint`: the default paint for the layout. Styles can override various attributes of the paint. <br /> |
| `width` | `int`: the wrapping width for the text. <br /> |
| `align` | `Layout.Alignment`: whether to left, right, or center the text. Styles can override the alignment. <br /> |
| `spacingMult` | `float`: factor by which to scale the font size to get the default line spacing <br /> |
| `spacingAdd` | `float`: amount to add to the default line spacing <br /> |

## Public methods

### computeDrawingBoundingBox

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RectF computeDrawingBoundingBox ()
```

Get an actual bounding box that draws text content.

Note that the `https://developer.android.com/reference/android/graphics/RectF#top` and `https://developer.android.com/reference/android/graphics/RectF#bottom` may be different from the
`https://developer.android.com/reference/android/text/Layout#getLineTop(int)` of the first line and `https://developer.android.com/reference/android/text/Layout#getLineBottom(int)` of
the last line. The line top and line bottom are calculated based on yMin/yMax or
ascent/descent value of font file. On the other hand, the drawing bounding boxes are
calculated based on actual glyphs used there.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/RectF` | bounding rectangle. This value cannot be `null`. <br /> |

### draw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void draw (Canvas c)
```

Draw this Layout on the specified Canvas.

This API draws background first, then draws text on top of it.

<br />

| Parameters ||
|---|---|
| `c` | `Canvas` <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)`

### draw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void draw (Canvas canvas, 
                Path selectionHighlight, 
                Paint selectionHighlightPaint, 
                int cursorOffsetVertical)
```

Draw this Layout on the specified canvas, with the highlight path drawn
between the background and the text.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas <br /> |
| `selectionHighlight` | `Path`: the path of the selection highlight or cursor; can be null <br /> |
| `selectionHighlightPaint` | `Paint`: the paint for the selection highlight <br /> |
| `cursorOffsetVertical` | `int`: the amount to temporarily translate the canvas while rendering the highlight <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)`

### draw

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void draw (Canvas canvas, 
                List<Path> highlightPaths, 
                List<Paint> highlightPaints, 
                Path selectionPath, 
                Paint selectionPaint, 
                int cursorOffsetVertical)
```

Draw this layout on the specified canvas.

This API draws background first, then draws highlight paths on top of it, then draws
selection or cursor, then finally draws text on top of it.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas. This value cannot be `null`. <br /> |
| `highlightPaths` | `List`: the path of the highlights. The highlightPaths and highlightPaints must have the same length and aligned in the same order. For example, the paint of the n-th of the highlightPaths should be stored at the n-th of highlightPaints. This value may be `null`. <br /> |
| `highlightPaints` | `List`: the paints for the highlights. The highlightPaths and highlightPaints must have the same length and aligned in the same order. For example, the paint of the n-th of the highlightPaths should be stored at the n-th of highlightPaints. This value may be `null`. <br /> |
| `selectionPath` | `Path`: the selection or cursor path. This value may be `null`. <br /> |
| `selectionPaint` | `Paint`: the paint for the selection or cursor. This value may be `null`. <br /> |
| `cursorOffsetVertical` | `int`: the amount to temporarily translate the canvas while rendering the highlight <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#drawBackground(android.graphics.Canvas)`
- `https://developer.android.com/reference/android/text/Layout#drawText(android.graphics.Canvas)`

### drawBackground

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void drawBackground (Canvas canvas)
```

Draw background of this layout.

Different from `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)` API, this API only draws
background, not drawing text, highlights or selections. The background here is drawn by
`https://developer.android.com/reference/android/text/style/LineBackgroundSpan` attached to the text.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)`
- `https://developer.android.com/reference/android/text/Layout#drawText(android.graphics.Canvas)`

### drawText

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void drawText (Canvas canvas)
```

Draw text part of this layout.

Different from `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)` API, this API only draws
text part, not drawing highlights, selections, or backgrounds.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout#draw(android.graphics.Canvas,%20java.util.List<android.graphics.Path>,%20java.util.List<android.graphics.Paint>,%20android.graphics.Path,%20android.graphics.Paint,%20int)`
- `https://developer.android.com/reference/android/text/Layout#drawBackground(android.graphics.Canvas)`

### fillCharacterBounds

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void fillCharacterBounds (int start, 
                int end, 
                float[] bounds, 
                int boundsStart)
```

Return the characters' bounds in the given range. The `bounds` array will be filled
starting from `boundsStart` (inclusive). The coordinates are in local text layout.

<br />

| Parameters ||
|---|---|
| `start` | `int`: the start index to compute the character bounds, inclusive. Value is 0 or greater <br /> |
| `end` | `int`: the end index to compute the character bounds, exclusive. Value is 0 or greater <br /> |
| `bounds` | `float`: the array to fill in the character bounds. The array is divided into segments of four where each index in that segment represents left, top, right and bottom of the character. This value cannot be `null`. <br /> |
| `boundsStart` | `int`: the inclusive start index in the array to start filling in the values from. Value is 0 or greater <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `bounds` is null. |
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | if the range defined by `start` and `end` exceeds the range of the text, or `bounds` doesn't have enough space to store the result. |

### getAlignment

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Layout.Alignment getAlignment ()
```

Returns the alignment used for creating this layout in pixels.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Layout.Alignment` | the alignment used for creating this layout. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setAlignment(android.text.Layout.Alignment)`

### getBottomPadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getBottomPadding ()
```

Returns the number of extra pixels of descent padding in the
bottom line of the Layout.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getBreakStrategy

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getBreakStrategy ()
```

Return the break strategy used for creating this layout.

<br />

| Returns ||
|---|---|
| `int` | the break strategy used for creating this layout. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_SIMPLE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_HIGH_QUALITY` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_BALANCED` |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setBreakStrategy(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setBreakStrategy(int)`

### getCursorPath

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getCursorPath (int point, 
                Path dest, 
                CharSequence editingBuffer)
```

Fills in the specified Path with a representation of a cursor
at the specified offset. This will often be a vertical line
but can be multiple discontinuous lines in text with multiple
directionalities.

<br />

| Parameters ||
|---|---|
| `point` | `int` <br /> |
| `dest` | `Path` <br /> |
| `editingBuffer` | `CharSequence` <br /> |

### getDesiredWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static float getDesiredWidth (CharSequence source, 
                TextPaint paint)
```

Return how wide a layout must be in order to display the specified text with one line per
paragraph.

As of O, Uses
`https://developer.android.com/reference/android/text/TextDirectionHeuristics#FIRSTSTRONG_LTR` as the default text direction heuristics. In
the earlier versions uses `https://developer.android.com/reference/android/text/TextDirectionHeuristics#LTR` as the default.

<br />

<br />

| Parameters ||
|---|---|
| `source` | `CharSequence` <br /> |
| `paint` | `TextPaint` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getDesiredWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static float getDesiredWidth (CharSequence source, 
                int start, 
                int end, 
                TextPaint paint)
```

Return how wide a layout must be in order to display the specified text slice with one
line per paragraph.

As of O, Uses
`https://developer.android.com/reference/android/text/TextDirectionHeuristics#FIRSTSTRONG_LTR` as the default text direction heuristics. In
the earlier versions uses `https://developer.android.com/reference/android/text/TextDirectionHeuristics#LTR` as the default.

<br />

<br />

| Parameters ||
|---|---|
| `source` | `CharSequence` <br /> |
| `start` | `int` <br /> |
| `end` | `int` <br /> |
| `paint` | `TextPaint` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getEllipsisCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getEllipsisCount (int line)
```

Returns the number of characters to be ellipsized away, or 0 if
no ellipsis is to take place.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getEllipsisStart

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getEllipsisStart (int line)
```

Return the offset of the first character to be ellipsized away,
relative to the start of the line. (So 0 if the beginning of the
line is ellipsized, not getLineStart().)

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getEllipsize

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final TextUtils.TruncateAt getEllipsize ()
```

Return the ellipsize option used for creating this layout.

May return null if no ellipsize option was selected.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextUtils.TruncateAt` | The ellipsize option used for creating this layout, or null if no ellipsize option was selected. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setEllipsize(android.text.TextUtils.TruncateAt)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setEllipsize(android.text.TextUtils.TruncateAt)`
- `https://developer.android.com/reference/android/text/Layout.Builder#setEllipsizedWidth(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setEllipsizedWidth(int)`
- `https://developer.android.com/reference/android/text/Layout#getEllipsizedWidth()`

### getEllipsizedWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getEllipsizedWidth ()
```

Return the width to which this layout is ellipsized.

If no ellipsize is applied, the same amount of `https://developer.android.com/reference/android/text/Layout#getWidth()` is returned.

<br />

| Returns ||
|---|---|
| `int` | the amount of ellipsized width in pixels. Value is 0 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setEllipsizedWidth(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setEllipsize(android.text.TextUtils.TruncateAt)`

### getHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHeight ()
```

Return the total height of this layout.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getHyphenationFrequency

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getHyphenationFrequency ()
```

Return the hyphenation frequency used for creating this layout.

<br />

| Returns ||
|---|---|
| `int` | the hyphenation frequency used for creating this layout. Value is one of the following: - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE` |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setHyphenationFrequency(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setHyphenationFrequency(int)`

### getJustificationMode

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getJustificationMode ()
```

Return the justification mode used for creating this layout.

<br />

| Returns ||
|---|---|
| `int` | the justification mode used for creating this layout. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_WORD` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_CHARACTER` |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setJustificationMode(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setJustificationMode(int)`

### getLeftIndents

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int[] getLeftIndents ()
```

Return a copy of the left indents used for this layout.

May return null if no left indentation is applied.

<br />

| Returns ||
|---|---|
| `int[]` | the array of left indents in pixels. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setLeftIndents(int[])`
- `https://developer.android.com/reference/android/text/Layout.Builder#setRightIndents(int[])`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setIndents(int[],%20int[])`

### getLineAscent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getLineAscent (int line)
```

Get the ascent of the text on the specified line.
The return value is negative to match the Paint.ascent() convention.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineBaseline

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getLineBaseline (int line)
```

Return the vertical position of the baseline of the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineBottom

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineBottom (int line, 
                boolean includeLineSpacing)
```

Return the vertical position of the bottom of the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int`: index of the line <br /> |
| `includeLineSpacing` | `boolean`: whether to include the line spacing <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getLineBottom (int line)
```

Return the vertical position of the bottom of the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineBounds

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineBounds (int line, 
                Rect bounds)
```

Return the baseline for the specified line (0...getLineCount() - 1)
If bounds is not null, return the top, left, right, bottom extents
of the specified line in it.

<br />

| Parameters ||
|---|---|
| `line` | `int`: which line to examine (0..getLineCount() - 1) <br /> |
| `bounds` | `Rect`: Optional. If not null, it returns the extent of the line <br /> |

| Returns ||
|---|---|
| `int` | the Y-coordinate of the baseline <br /> |

### getLineBreakConfig

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LineBreakConfig getLineBreakConfig ()
```

Gets the `https://developer.android.com/reference/android/graphics/text/LineBreakConfig` used for creating this layout.

Do not modify the returned object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/text/LineBreakConfig` | The line break config used for creating this layout. This value cannot be `null`. <br /> |

### getLineContainsTab

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean getLineContainsTab (int line)
```

Returns whether the specified line contains one or more
characters that need to be handled specially, like tabs.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### getLineCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getLineCount ()
```

Return the number of lines of text in this layout.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getLineDescent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getLineDescent (int line)
```

Return the descent of the specified line(0...getLineCount() - 1).

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineDirections

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract Layout.Directions getLineDirections (int line)
```

Returns the directional run information for the specified line.
The array alternates counts of characters in left-to-right
and right-to-left segments of the line.

NOTE: this is inadequate to support bidirectional text, and will change.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Layout.Directions` | <br /> |

### getLineEnd

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getLineEnd (int line)
```

Return the text offset after the last character on the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineForOffset

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineForOffset (int offset)
```

Get the line number on which the specified text offset appears.
If you ask for a position before 0, you get 0; if you ask for a position
beyond the end of the text, you get the last line.

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineForVertical

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineForVertical (int vertical)
```

Get the line number corresponding to the specified vertical position.
If you ask for a position above 0, you get 0; if you ask for a position
below the bottom of the text, you get the last line.

<br />

| Parameters ||
|---|---|
| `vertical` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineLeft (int line)
```

Get the leftmost position that should be exposed for horizontal
scrolling on the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getLineLetterSpacingUnitCount

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineLetterSpacingUnitCount (int line, 
                boolean includeTrailingWhitespace)
```

Returns the number of letter spacing unit in the line.


This API returns a number of letters that is a target of letter spacing. The letter spacing
won't be added to the middle of the characters that are needed to be treated as a single,
e.g., ligatured or conjunct form. Note that this value is different from the number of\]
grapheme clusters that is calculated by `https://developer.android.com/reference/java/text/BreakIterator#getCharacterInstance(java.util.Locale)`.
For example, if the "fi" is ligatured, the ligatured form is treated as single uni and letter
spacing is not added, but it has two separate grapheme cluster.


This value is used for calculating the letter spacing amount for the justification because
the letter spacing is applied between clusters. For example, if extra `W` pixels needed
to be filled by letter spacing, the amount of letter spacing to be applied is
`W`/(letter spacing unit count - 1) px.

<br />

| Parameters ||
|---|---|
| `line` | `int`: the index of the line. Value is 0 or greater <br /> |
| `includeTrailingWhitespace` | `boolean`: whether to include trailing whitespace <br /> |

| Returns ||
|---|---|
| `int` | the number of cluster count in the line. Value is 0 or greater <br /> |

### getLineMax

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineMax (int line)
```

Gets the unsigned horizontal extent of the specified line, including
leading margin indent, but excluding trailing whitespace.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getLineRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineRight (int line)
```

Get the rightmost position that should be exposed for horizontal
scrolling on the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getLineSpacingAmount

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final float getLineSpacingAmount ()
```

Returns the amount added to the line height.

<br />

| Returns ||
|---|---|
| `float` | the line height additional amount. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setLineSpacingAmount(float)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/text/Layout#getSpacingAdd()`

### getLineSpacingMultiplier

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final float getLineSpacingMultiplier ()
```

Returns the multiplier applied to the line height.

<br />

| Returns ||
|---|---|
| `float` | the line height multiplier. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setLineSpacingMultiplier(float)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/text/Layout#getSpacingMultiplier()`

### getLineStart

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getLineStart (int line)
```

Return the text offset of the beginning of the specified line (
0...getLineCount()). If the specified line is equal to the line
count, returns the length of the text.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getLineTop (int line)
```

Return the vertical position of the top of the specified line
(0...getLineCount()).
If the specified line is equal to the line count, returns the
bottom of the last line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineVisibleEnd

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineVisibleEnd (int line)
```

Return the text offset after the last visible character (so whitespace
is not counted) on the specified line.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getLineWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineWidth (int line)
```

Gets the unsigned horizontal extent of the specified line, including
leading margin indent and trailing whitespace.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getMaxLines

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getMaxLines ()
```

Return the maximum lines allowed used for creating this layout.

Note that this is not an actual line count of this layout. Use `https://developer.android.com/reference/android/text/Layout#getLineCount()` for
getting the actual line count of this layout.

<br />

| Returns ||
|---|---|
| `int` | the maximum lines allowed used for creating this layout. Value is 1 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setMaxLines(int)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setMaxLines(int)`

### getMinimumFontMetrics

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Paint.FontMetrics getMinimumFontMetrics ()
```

Get the minimum font metrics used for line spacing.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Paint.FontMetrics` | a minimum font metrics. `null` for using the value obtained by `https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/widget/TextView#getMinimumFontMetrics()`
- `https://developer.android.com/reference/android/text/Layout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/DynamicLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`

### getOffsetForHorizontal

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOffsetForHorizontal (int line, 
                float horiz)
```

Get the character offset on the specified line whose position is
closest to the specified horizontal position.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |
| `horiz` | `float` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getOffsetToLeftOf

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOffsetToLeftOf (int offset)
```

<br />

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getOffsetToRightOf

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOffsetToRightOf (int offset)
```

<br />

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getPaint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final TextPaint getPaint ()
```

Return the paint used for creating this layout.

Do not modify the returned paint object. This paint object will still be used for
drawing/measuring text.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextPaint` | the paint used for creating this layout. This value cannot be `null`. <br /> |

### getParagraphAlignment

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Layout.Alignment getParagraphAlignment (int line)
```

Get the alignment of the specified paragraph, taking into account
markup attached to it.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Layout.Alignment` | <br /> |

### getParagraphDirection

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getParagraphDirection (int line)
```

Returns the primary directionality of the paragraph containing the
specified line, either 1 for left-to-right lines, or -1 for right-to-left
lines (see `https://developer.android.com/reference/android/text/Layout#DIR_LEFT_TO_RIGHT`, `https://developer.android.com/reference/android/text/Layout#DIR_RIGHT_TO_LEFT`).

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getParagraphLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getParagraphLeft (int line)
```

Get the left edge of the specified paragraph, inset by left margins.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getParagraphRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getParagraphRight (int line)
```

Get the right edge of the specified paragraph, inset by right margins.

<br />

| Parameters ||
|---|---|
| `line` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getPrimaryHorizontal

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getPrimaryHorizontal (int offset)
```

Get the primary horizontal position for the specified text offset.
This is the location where a new character would be inserted in
the paragraph's primary direction.

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getRangeForRect

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getRangeForRect (RectF area, 
                SegmentFinder segmentFinder, 
                Layout.TextInclusionStrategy inclusionStrategy)
```

Finds the range of text which is inside the specified rectangle area. The start of the range
is the start of the first text segment inside the area, and the end of the range is the end
of the last text segment inside the area.

A text segment is considered to be inside the area according to the provided `https://developer.android.com/reference/android/text/Layout.TextInclusionStrategy`. If a text segment spans multiple lines or multiple directional runs
(e.g. a hyphenated word), the text segment is divided into pieces at the line and run breaks,
then the text segment is considered to be inside the area if any of its pieces are inside the
area.

The returned range may also include text segments which are not inside the specified area,
if those text segments are in between text segments which are inside the area. For example,
the returned range may be "segment1 segment2 segment3" if "segment1" and "segment3" are
inside the area and "segment2" is not.

<br />

| Parameters ||
|---|---|
| `area` | `RectF`: area for which the text range will be found. This value cannot be `null`. <br /> |
| `segmentFinder` | `SegmentFinder`: SegmentFinder for determining the ranges of text to be considered as a text segment. This value cannot be `null`. <br /> |
| `inclusionStrategy` | `Layout.TextInclusionStrategy`: strategy for determining whether a text segment is inside the specified area. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int[]` | int array of size 2 containing the start (inclusive) and end (exclusive) character offsets of the text range, or null if there are no text segments inside the area <br /> |

### getRightIndents

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int[] getRightIndents ()
```

Return a copy of the right indents used for this layout.

May return null if no right indentation is applied.

<br />

| Returns ||
|---|---|
| `int[]` | the array of right indents in pixels. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setLeftIndents(int[])`
- `https://developer.android.com/reference/android/text/Layout.Builder#setRightIndents(int[])`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setIndents(int[],%20int[])`

### getSecondaryHorizontal

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getSecondaryHorizontal (int offset)
```

Get the secondary horizontal position for the specified text offset.
This is the location where a new character would be inserted in
the direction other than the paragraph's primary direction.

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `float` | <br /> |

### getSelectionPath

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getSelectionPath (int start, 
                int end, 
                Path dest)
```

Fills in the specified Path with a representation of a highlight
between the specified offsets. This will often be a rectangle
or a potentially discontinuous set of rectangles. If the start
and end are the same, the returned path is empty.

<br />

| Parameters ||
|---|---|
| `start` | `int` <br /> |
| `end` | `int` <br /> |
| `dest` | `Path` <br /> |

### getShiftDrawingOffsetForStartOverhang

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getShiftDrawingOffsetForStartOverhang ()
```

Returns true if shifting drawing offset for start overhang.

<br />

| Returns ||
|---|---|
| `boolean` | True if shifting drawing offset for start overhang. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShiftDrawingOffsetForStartOverhang(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getShiftDrawingOffsetForStartOverhang()`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setShiftDrawingOffsetForStartOverhang(boolean)`
- `https://developer.android.com/reference/android/text/DynamicLayout.Builder#setShiftDrawingOffsetForStartOverhang(boolean)`

### getSpacingAdd

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final float getSpacingAdd ()
```

Returns the amount added to the line height.

<br />

| Returns ||
|---|---|
| `float` | the line height additional amount. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setLineSpacing(float,%20float)`

### getSpacingMultiplier

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final float getSpacingMultiplier ()
```

Returns the multiplier applied to the line height.

<br />

| Returns ||
|---|---|
| `float` | the line height multiplier. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setLineSpacing(float,%20float)`

### getText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final CharSequence getText ()
```

Return the text used for creating this layout.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the text used for creating this layout. This value cannot be `null`. <br /> |

### getTextDirectionHeuristic

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final TextDirectionHeuristic getTextDirectionHeuristic ()
```

Returns the text direction heuristic used for creating this layout.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextDirectionHeuristic` | the text direction heuristic used for creating this layout. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setTextDirectionHeuristic(android.text.TextDirectionHeuristic)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setTextDirection(android.text.TextDirectionHeuristic)`

### getTopPadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract int getTopPadding ()
```

Returns the (negative) number of extra pixels of ascent padding in the
top line of the Layout.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getUseBoundsForWidth

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getUseBoundsForWidth ()
```

Returns true if using bounding box as a width, false for using advance as a width.

<br />

| Returns ||
|---|---|
| `boolean` | True if using bounding box for width, false if using advance for width. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setUseBoundsForWidth(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseBoundsForWidth(boolean)`
- `https://developer.android.com/reference/android/text/DynamicLayout.Builder#setUseBoundsForWidth(boolean)`

### getWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getWidth ()
```

Return the width used for creating this layout in pixels.

<br />

| Returns ||
|---|---|
| `int` | the width used for creating this layout in pixels. Value is 0 or greater <br /> |

### increaseWidthTo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void increaseWidthTo (int wid)
```

Increase the width of this layout to the specified width.
Be careful to use this only when you know it is appropriate---
it does not cause the text to reflow to use the full new width.

<br />

| Parameters ||
|---|---|
| `wid` | `int` <br /> |

### isFallbackLineSpacingEnabled

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFallbackLineSpacingEnabled ()
```

Return true if the fallback line space is enabled in this Layout.

<br />

| Returns ||
|---|---|
| `boolean` | true if the fallback line space is enabled. Otherwise, returns false. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean)`

### isFontPaddingIncluded

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isFontPaddingIncluded ()
```

Returns true if this layout is created with increased line height.

<br />

| Returns ||
|---|---|
| `boolean` | true if the layout is created with increased line height. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Layout.Builder#setFontPaddingIncluded(boolean)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setIncludePad(boolean)`

### isRtlCharAt

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isRtlCharAt (int offset)
```

Returns true if the character at offset is right to left (RTL).

<br />

| Parameters ||
|---|---|
| `offset` | `int`: the offset <br /> |

| Returns ||
|---|---|
| `boolean` | true if the character is RTL, false if it is LTR <br /> |

## Protected methods

### isSpanned

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected final boolean isSpanned ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |