TextView.SetLineHeight(Int32, Single) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將此 TextView 的明確行高度設定為指定的單位和值。
[Android.Runtime.Register("setLineHeight", "(IF)V", "GetSetLineHeight_IFHandler", ApiSince=34)]
public virtual void SetLineHeight(int unit, float lineHeight);
[<Android.Runtime.Register("setLineHeight", "(IF)V", "GetSetLineHeight_IFHandler", ApiSince=34)>]
abstract member SetLineHeight : int * single -> unit
override this.SetLineHeight : int * single -> unit
參數
- unit
- Int32
所需的維度單位。 強烈建議使用 SP 單位,以確保字型放大時,行高與文字大小成正比。
- lineHeight
- Single
以給定單位計算的線高。
- 屬性
備註
將此 TextView 的明確行高度設定為指定的單位和值。 這相當於 TextView 中後續基線之間的垂直距離。 關於可能的維度單位,請參見 TypedValue 。
Java 文件 android.widget.TextView.setLineHeight(int, float)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。