LineBreakWordStyle 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 word-based line-break rules used by a line-break configuration.
public enum LineBreakWordStyle
type LineBreakWordStyle =
- Inheritance
-
LineBreakWordStyle
Fields
| Name | Value | Description |
|---|---|---|
| Unspecified | -1 | No line-break word style is specified. When Merge(LineBreakConfig) merges a configuration with an unspecified word style, it keeps the builder's existing word style.
For text layout, this value resolves to None when the target SDK is API level 34 or earlier, and to Auto when the target SDK is API level 35 or later. 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. |
| None | 0 | No line-break word style is used for line breaking. 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. |
| Phrase | 1 | Line breaking is based on phrases, which helps text wrap at meaningful word boundaries. If text cannot fit, it may still be broken at a grapheme boundary. Support for this line-break word style depends on locale. If the current locale does not support phrase-based text wrapping, this setting has no effect. 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. |
| Auto | 2 | A special value for the line breaking word style option. The auto option for the line break word style does some heuristics based on locales and line count. If a locale list contains Korean script, this option uses Phrase. If it contains Japanese script but not Korean script, the line breaker can try phrase-based breaks when its first result has fewer than five lines. It keeps the phrase-based result only if that result also has fewer than five lines. Otherwise, it uses None. Note: future versions may have special line breaking word style rules for other locales. 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
Phrase requests phrase-based wrapping where the locale supports it. Auto lets the platform use locale and line-count rules; it does not guarantee phrase-based wrapping.
Unspecified preserves the existing value during a merge. It is not the same as explicitly selecting Auto.
This enum exposes the LINE_BREAK_WORD_STYLE_* constants from LineBreakConfig.