Udostępnij za pośrednictwem


TextView.SetMaxLines(Int32) Method

Definition

Sets the height of the TextView to be at most maxLines tall.

[Android.Runtime.Register("setMaxLines", "(I)V", "GetSetMaxLines_IHandler")]
public virtual void SetMaxLines (int maxLines);
[<Android.Runtime.Register("setMaxLines", "(I)V", "GetSetMaxLines_IHandler")>]
abstract member SetMaxLines : int -> unit
override this.SetMaxLines : int -> unit

Parameters

maxLines
Int32

the maximum height of TextView in terms of number of lines

Attributes

Remarks

Sets the height of the TextView to be at most maxLines tall.

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

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