Condividi tramite


TextView.SetLineHeight(Int32, Single) Method

Definition

Sets an explicit line height to a given unit and value for this 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

Parameters

unit
Int32

The desired dimension unit. SP units are strongly recommended so that line height stays proportional to the text size when fonts are scaled up for accessibility.

lineHeight
Single

The desired line height in the given units.

Attributes

Remarks

Sets an explicit line height to a given unit and value for this TextView. This is equivalent to the vertical distance between subsequent baselines in the TextView. See TypedValue for the possible dimension units.

Java documentation for android.widget.TextView.setLineHeight(int, float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to