TextView.BreakStrategy Property
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.
Gets the current strategy for breaking paragraphs into lines. -or- Sets the break strategy for breaking paragraphs into lines.
public virtual Android.Text.BreakStrategy BreakStrategy { [Android.Runtime.Register("getBreakStrategy", "()I", "GetGetBreakStrategyHandler", ApiSince=23)] get; [Android.Runtime.Register("setBreakStrategy", "(I)V", "GetSetBreakStrategy_IHandler", ApiSince=23)] set; }
[<get: Android.Runtime.Register("getBreakStrategy", "()I", "GetGetBreakStrategyHandler", ApiSince=23)>]
[<set: Android.Runtime.Register("setBreakStrategy", "(I)V", "GetSetBreakStrategy_IHandler", ApiSince=23)>]
member this.BreakStrategy : Android.Text.BreakStrategy with get, set
Property Value
the current strategy for breaking paragraphs into lines.
- Attributes
Remarks
Property getter documentation:
Gets the current strategy for breaking paragraphs into lines.
Java documentation for android.widget.TextView.getBreakStrategy()
.
Property setter documentation:
Sets the break strategy for breaking paragraphs into lines. The default value for TextView is Layout#BREAK_STRATEGY_HIGH_QUALITY
, and the default value for EditText is Layout#BREAK_STRATEGY_SIMPLE
, the latter to avoid the text "dancing" when being edited.
Enabling hyphenation with either using Layout#HYPHENATION_FREQUENCY_NORMAL
or Layout#HYPHENATION_FREQUENCY_FULL
while line breaking is set to one of Layout#BREAK_STRATEGY_BALANCED
, Layout#BREAK_STRATEGY_HIGH_QUALITY
improves the structure of text layout however has performance impact and requires more time to do the text layout.
Compared with #setLineBreakStyle(int)
, line break style with different strictness is evaluated in the ICU to identify the potential breakpoints. In #setBreakStrategy(int)
, line break strategy handles the post processing of ICU's line break result. It aims to evaluate ICU's breakpoints and break the lines based on the constraint.
Java documentation for android.widget.TextView.setBreakStrategy(int)
.
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.