TextView.UseBoundsForWidth 属性

定义

如果将边界框用作宽度,则返回 true,对于将前进用作宽度,则返回 false。 - 或 - 将边界框的宽度设置为 true,作为自动换行和绘图的源。

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

属性值

如果对宽度使用边界框,则为 true;如果对宽度使用前进,则为 false。

属性

注解

属性 getter 文档:

如果将边界框用作宽度,则返回 true,对于将前进用作宽度,则返回 false。

Java文档android.widget.TextView.getUseBoundsForWidth()

属性 setter 文档:

将边界框的宽度设置为 true,作为自动换行和绘图的源。

如果此值为 false,则 TextView 根据文本宽度的总进进确定视图宽度、绘图偏移量和自动换行符。 通过设置 true,使用字形绑定作为文本宽度的来源。

如果用于此 TextView 的字体具有负承载 X 或字形 xMax 大于提前的字形,则可能会发生字形剪裁,因为绘图区可能大于提前。 通过将此项设置为 true,TextView 将保留更多绘图空间,因此可以阻止剪裁。

如果目标 API 版本为 35 或更高版本,则此值为 true。

Java文档android.widget.TextView.setUseBoundsForWidth(boolean)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于