TextGranularity
-
Cmn
value class TextGranularity
Used by Paragraph.getRangeForRect. It specifies the minimal unit of the text ranges that is considered by the Paragraph.getRangeForRect.
Summary
Public companion properties |
||
|---|---|---|
TextGranularity |
Character level granularity. |
Cmn
|
TextGranularity |
Word level granularity. |
Cmn
|
Public companion properties
Character
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
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.