LineBreak.WordBreak

  • Common/All
  • Android/JVM

Describes how line breaks should be inserted within words.

Summary

Public companion properties

LineBreak.WordBreak

Default word breaking rules for the locale.

android
LineBreak.WordBreak

Line breaking is based on phrases.

android
LineBreak.WordBreak

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

android

Public functions

open String
android

Public companion properties

Default

val DefaultLineBreak.WordBreak

Default word breaking rules for the locale. In latin scripts this means inserting line breaks between words, while in languages that don't use whitespace (e.g. Japanese) the line can break between characters.

+---------+
| This is |
| an      |
| example |
| text.   |
| 今日は自  |
| 由が丘で  |
| 焼き鳥を  |
| 食べま   |
| す。     |
+---------+

Phrase

val PhraseLineBreak.WordBreak

Line breaking is based on phrases. In languages that don't use whitespace (e.g. Japanese), line breaks are not inserted between characters that are part of the same phrase unit. This is ideal for short text such as titles and UI labels.

+---------+
| This    |
| is an   |
| example |
| text.   |
| 今日は   |
| 自由が丘  |
| で焼き鳥  |
| を食べ   |
| ます。   |
+---------+

Unspecified

val UnspecifiedLineBreak.WordBreak

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Public functions

toString

open fun toString(): String

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Sep 5, 2024

Follow best practices, eliminate boilerplate code, and reduce fragmentation

Updated Dec 11, 2024

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Jun 26, 2024