Partager via


TextView.SetHeight(Int32) Method

Definition

Sets the height of the TextView to be exactly pixels tall.

[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

Parameters

pixels
Int32

the exact height of the TextView in terms of pixels

Attributes

Remarks

Sets the height of the TextView to be exactly pixels tall.

This value is used for height calculation if LayoutParams does not force TextView to have an exact height. Setting this value overrides previous minimum/maximum height configurations such as #setMinHeight(int) or #setMaxHeight(int).

Java documentation for android.widget.TextView.setHeight(int).

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