TextView.SetMaxHeight(Int32) 方法

定义

将 TextView 的高度设置为最高 maxPixels 高度。

[Android.Runtime.Register("setMaxHeight", "(I)V", "GetSetMaxHeight_IHandler")]
public virtual void SetMaxHeight (int maxPixels);
[<Android.Runtime.Register("setMaxHeight", "(I)V", "GetSetMaxHeight_IHandler")>]
abstract member SetMaxHeight : int -> unit
override this.SetMaxHeight : int -> unit

参数

maxPixels
Int32

TextView 的最大高度(以像素为单位)

属性

注解

将 TextView 的高度设置为最高 maxPixels 高度。

如果 LayoutParams 不强制 TextView 具有确切的高度,则此值用于高度计算。 设置此值会替代以前的最大高度配置,例如 #setMaxLines(int)#setLines(int)

android.widget.TextView.setMaxHeight(int)Java 文档。

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

适用于