語言

TextView.SetLines(Int32) 方法

定義

將 TextView 的高度設定為完全 lines 高。

[Android.Runtime.Register("setLines", "(I)V", "GetSetLines_IHandler")]
public virtual void SetLines(int lines);
[<Android.Runtime.Register("setLines", "(I)V", "GetSetLines_IHandler")>]
abstract member SetLines : int -> unit
override this.SetLines : int -> unit

參數

lines
Int32

以線數計算的 TextView 精確高度

屬性

備註

將 TextView 的高度設定為完全 lines 高。

如果 LayoutParams 不強制 TextView 有精確高度,這個值會用於高度計算。 設定此值可覆蓋先前的最小/最大高度配置,如 #setMinLines(int)#setMaxLines(int)#setSingleLine() 會將此值設為 1。

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

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

適用於