Added in API level 29

Result


open class Result
kotlin.Any
   ↳ android.graphics.text.LineBreaker.Result

Holds the result of the line breaking algorithm.

Summary

Public methods
open Int

Returns an end hyphen edit for the line.

open Float
getLineAscent(lineIndex: Int)

Returns font ascent of the line in pixels.

open Int
getLineBreakOffset(lineIndex: Int)

Returns character offset of the break for a given line.

open Int

Returns the number of lines in the paragraph.

open Float
getLineDescent(lineIndex: Int)

Returns font descent of the line in pixels.

open Float
getLineWidth(lineIndex: Int)

Returns width of a given line in pixels.

open Int

Returns a start hyphen edit for the line.

open Boolean
hasLineTab(lineIndex: Int)

Returns true if the line has a TAB character.

Public methods

getEndLineHyphenEdit

Added in API level 29
open fun getEndLineHyphenEdit(lineIndex: Int): Int

Returns an end hyphen edit for the line.

Parameters
lineIndex Int: an index of the line.
Return
Int an end hyphen edit for the line.

getLineAscent

Added in API level 29
open fun getLineAscent(lineIndex: Int): Float

Returns font ascent of the line in pixels.
The units of this value are pixels.

Parameters
lineIndex Int: an index of the line. Value is 0 or greater
Return
Float an entier font ascent of the line in pixels. The units of this value are pixels. {}

getLineBreakOffset

Added in API level 29
open fun getLineBreakOffset(lineIndex: Int): Int

Returns character offset of the break for a given line.

Parameters
lineIndex Int: an index of the line. Value is 0 or greater
Return
Int the break offset. Value is 0 or greater

getLineCount

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

Returns the number of lines in the paragraph.

Return
Int number of lines Value is 0 or greater

getLineDescent

Added in API level 29
open fun getLineDescent(lineIndex: Int): Float

Returns font descent of the line in pixels.
The units of this value are pixels.

Parameters
lineIndex Int: an index of the line. Value is 0 or greater
Return
Float an entier font descent of the line in pixels. The units of this value are pixels. {}

getLineWidth

Added in API level 29
open fun getLineWidth(lineIndex: Int): Float

Returns width of a given line in pixels.
The units of this value are pixels.

Parameters
lineIndex Int: an index of the line. Value is 0 or greater
Return
Float width of the line in pixels The units of this value are pixels. {}

getStartLineHyphenEdit

Added in API level 29
open fun getStartLineHyphenEdit(lineIndex: Int): Int

Returns a start hyphen edit for the line.

Parameters
lineIndex Int: an index of the line.
Return
Int a start hyphen edit for the line.

hasLineTab

Added in API level 29
open fun hasLineTab(lineIndex: Int): Boolean

Returns true if the line has a TAB character.

Parameters
lineIndex Int: an index of the line.
Return
Boolean true if the line has a TAB character