TextView.UseBoundsForWidth Property

Definition

Returns true if using bounding box as a width, false for using advance as a width. -or- Set true for using width of bounding box as a source of automatic line breaking and drawing.

public virtual bool UseBoundsForWidth { [Android.Runtime.Register("getUseBoundsForWidth", "()Z", "GetGetUseBoundsForWidthHandler", ApiSince=35)] get; [Android.Runtime.Register("setUseBoundsForWidth", "(Z)V", "GetSetUseBoundsForWidth_ZHandler", ApiSince=35)] set; }
[<get: Android.Runtime.Register("getUseBoundsForWidth", "()Z", "GetGetUseBoundsForWidthHandler", ApiSince=35)>]
[<set: Android.Runtime.Register("setUseBoundsForWidth", "(Z)V", "GetSetUseBoundsForWidth_ZHandler", ApiSince=35)>]
member this.UseBoundsForWidth : bool with get, set

Property Value

True if using bounding box for width, false if using advance for width.

Attributes

Remarks

Property getter documentation:

Returns true if using bounding box as a width, false for using advance as a width.

Java documentation for android.widget.TextView.getUseBoundsForWidth().

Property setter documentation:

Set true for using width of bounding box as a source of automatic line breaking and drawing.

If this value is false, the TextView determines the View width, drawing offset and automatic line breaking based on total advances as text widths. By setting true, use glyph bound's as a source of text width.

If the font used for this TextView has glyphs that has negative bearing X or glyph xMax is greater than advance, the glyph clipping can be happened because the drawing area may be bigger than advance. By setting this to true, the TextView will reserve more spaces for drawing are, so clipping can be prevented.

This value is true by default if the target API version is 35 or later.

Java documentation for android.widget.TextView.setUseBoundsForWidth(boolean).

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