語言

TextView.SetHeight(Int32) 方法

定義

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

[Android.Runtime.Register("setHeight", "(I)V", "GetSetHeight_IHandler")]
public virtual void SetHeight(int pixels);
[<Android.Runtime.Register("setHeight", "(I)V", "GetSetHeight_IHandler")>]
abstract member SetHeight : int -> unit
override this.SetHeight : int -> unit

參數

pixels
Int32

TextView 以像素為單位的精確高度

屬性

備註

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

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

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

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

適用於