TextView.SetLines(Int32) Method

Definition

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

[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

Parameters

lines
Int32

the exact height of the TextView in terms of lines

Attributes

Remarks

Sets the height of the TextView to be exactly lines 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 #setMinLines(int) or #setMaxLines(int). #setSingleLine() will set this value to 1.

Java documentation for android.widget.TextView.setLines(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