🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

TextGranularity

Used by Paragraph.getRangeForRect.

Source set: Common
public class TextGranularity private constructor(private val value: Int)

Used by Paragraph.getRangeForRect. It specifies the minimal unit of the text ranges that is considered by the Paragraph.getRangeForRect.

Members

Companion

Source set: Common
public companion object

Properties

Character

Source set: Common
public val Character: TextGranularity

Character level granularity. The text string will be break into ranges each corresponding to a visual character. e.g. "Hi \uD83D\uDE00" will be break into: 'H', 'i', ' ', '\uD83D\uDE00' (grin face emoji).

Word

Source set: Common
public val Word: TextGranularity

Word level granularity. The text string will be break into ranges each corresponding to a word. e.g. "Hello world" wil be break into "Hello", "world" the space character is not considered as a word.