BreakStrategy Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the algorithm used to choose line breaks in a paragraph.
public enum BreakStrategy
type BreakStrategy =
- Inheritance
-
BreakStrategy
Fields
| Name | Value | Description |
|---|---|---|
| Simple | 0 | Value for break strategy indicating simple line breaking. The line breaker puts words to the line as much as possible and breaks line if no more words can fit into the same line. Automatic hyphens are only added when a line has a single word and that word is longer than line width. This is the fastest break strategy and ideal for editor. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| HighQuality | 1 | Value for break strategy indicating high quality line breaking. With this option the line breaker normally optimizes the whole paragraph for more readable text, and applies automatic hyphenation when it is enabled and required. For paragraphs containing tabs, it uses the greedy algorithm instead. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Balanced | 2 | Value for break strategy indicating balanced line breaking. The line breaker normally optimizes the whole paragraph to make lines similar in length, and applies automatic hyphenation when it is enabled and required. For paragraphs containing tabs, it uses the greedy algorithm instead. This break strategy is good for small screen devices such as watch screens. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
Remarks
Use these values with SetBreakStrategy(BreakStrategy). Simple fills each line in order. The high-quality and balanced strategies optimize the whole paragraph unless it contains tabs, in which case the greedy algorithm is used.
This enum exposes the BREAK_STRATEGY_* constants from LineBreaker.