Partager via


LineBreakConfig.LineBreakStyleUnspecified Field

Definition

Caution

This constant will be removed in the future version. Use Android.Graphics.Text.LineBreakStyle enum directly instead of this field.

No line break style is specified.

[Android.Runtime.Register("LINE_BREAK_STYLE_UNSPECIFIED", ApiSince=35)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.Text.LineBreakStyle enum directly instead of this field.", true)]
public const Android.Graphics.Text.LineBreakStyle LineBreakStyleUnspecified = -1;
[<Android.Runtime.Register("LINE_BREAK_STYLE_UNSPECIFIED", ApiSince=35)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.Text.LineBreakStyle enum directly instead of this field.", true)>]
val mutable LineBreakStyleUnspecified : Android.Graphics.Text.LineBreakStyle

Field Value

Value = -1

Implements

Attributes

Remarks

No line break style is specified.

This is a special value of line break style indicating no style value is specified. When overriding a LineBreakConfig with another LineBreakConfig with Builder#merge(LineBreakConfig) function, the line break style of overridden config will be kept if the line break style of overriding config is #LINE_BREAK_STYLE_UNSPECIFIED.

val override = LineBreakConfig.Builder()
                     .setLineBreakWordStyle(LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
                     .build();  // UNSPECIFIED if no setLineBreakStyle is called.
                val config = LineBreakConfig.Builder()
                     .setLineBreakStyle(LineBreakConfig.LINE_BREAK_STYLE_STRICT)
                     .merge(override)
                     .build()
                // Here, config has LINE_BREAK_STYLE_STRICT for line break config and
                // LINE_BREAK_WORD_STYLE_PHRASE for line break word style.

This value is resolved to #LINE_BREAK_STYLE_NONE if the target SDK version is API Build.VERSION_CODES#UPSIDE_DOWN_CAKE or before and this value is used for text layout/rendering. This value is resolved to #LINE_BREAK_STYLE_AUTO if the target SDK version is API Build.VERSION_CODES#VANILLA_ICE_CREAM or after and this value is used for text layout/rendering.

Java documentation for android.graphics.text.LineBreakConfig.LINE_BREAK_STYLE_UNSPECIFIED.

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.

Applies to