語言

TextView.SetMaxLines(Int32) 方法

定義

將 TextView 的高度設定為最多 maxLines 高。

[Android.Runtime.Register("setMaxLines", "(I)V", "GetSetMaxLines_IHandler")]
public virtual void SetMaxLines(int maxLines);
[<Android.Runtime.Register("setMaxLines", "(I)V", "GetSetMaxLines_IHandler")>]
abstract member SetMaxLines : int -> unit
override this.SetMaxLines : int -> unit

參數

maxLines
Int32

以行數計算的 TextView 最大高度

屬性

備註

將 TextView 的高度設定為最多 maxLines 高。

如果 LayoutParams 不強制 TextView 有精確高度,這個值會用於高度計算。 設定此值可覆蓋先前最大高度配置,如 #setMaxHeight(int)#setLines(int)

Java 文件 android.widget.TextView.setMaxLines(int)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於