TextGranularity
Class
Common
value 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
.
Companion Object
Properties
Common
val Character = TextGranularity(0)
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).
Common
val Word = TextGranularity(1)
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.