{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LineBreak.Strategy


The strategy used for line breaking.

Summary

Public companion properties

LineBreak.Strategy

Attempts to balance the line lengths of the text, also applying automatic hyphenation if enabled.

android
LineBreak.Strategy

Does whole paragraph optimization for more readable text, including hyphenation if enabled.

android
LineBreak.Strategy

Basic, fast break strategy.

android

Public functions

open String
android

Public companion properties

Balanced

val BalancedLineBreak.Strategy

Attempts to balance the line lengths of the text, also applying automatic hyphenation if enabled. Suitable for small screens.

+-----------------------+
| This is an            |
| example text.         |
+-----------------------+

HighQuality

val HighQualityLineBreak.Strategy

Does whole paragraph optimization for more readable text, including hyphenation if enabled.

+---------+
| This    |
| is an   |
| example |
| text.   |
+---------+

Simple

val SimpleLineBreak.Strategy

Basic, fast break strategy. Hyphenation, if enabled, is done only for words that don't fit on an entire line by themselves.

+---------+
| This is |
| an      |
| example |
| text.   |
+---------+

Public functions

toString

open fun toString(): String