Udostępnij za pośrednictwem


TextView.SetSingleLine Method

Definition

Overloads

SetSingleLine()

Sets the properties of this field (lines, horizontally scrolling, transformation method) to be for a single-line input.

SetSingleLine(Boolean)

If true, sets the properties of this field (number of lines, horizontally scrolling, transformation method) to be for a single-line input; if false, restores these to the default conditions.

SetSingleLine()

Sets the properties of this field (lines, horizontally scrolling, transformation method) to be for a single-line input.

[Android.Runtime.Register("setSingleLine", "()V", "GetSetSingleLineHandler")]
public virtual void SetSingleLine ();
[<Android.Runtime.Register("setSingleLine", "()V", "GetSetSingleLineHandler")>]
abstract member SetSingleLine : unit -> unit
override this.SetSingleLine : unit -> unit
Attributes

Remarks

Sets the properties of this field (lines, horizontally scrolling, transformation method) to be for a single-line input.

Java documentation for android.widget.TextView.setSingleLine().

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

SetSingleLine(Boolean)

If true, sets the properties of this field (number of lines, horizontally scrolling, transformation method) to be for a single-line input; if false, restores these to the default conditions.

[Android.Runtime.Register("setSingleLine", "(Z)V", "GetSetSingleLine_ZHandler")]
public virtual void SetSingleLine (bool singleLine);
[<Android.Runtime.Register("setSingleLine", "(Z)V", "GetSetSingleLine_ZHandler")>]
abstract member SetSingleLine : bool -> unit
override this.SetSingleLine : bool -> unit

Parameters

singleLine
Boolean
Attributes

Remarks

If true, sets the properties of this field (number of lines, horizontally scrolling, transformation method) to be for a single-line input; if false, restores these to the default conditions.

Note that the default conditions are not necessarily those that were in effect prior this method, and you may want to reset these properties to your custom values.

Note that due to performance reasons, by setting single line for the EditText, the maximum text length is set to 5000 if no other character limitation are applied.

Java documentation for android.widget.TextView.setSingleLine(boolean).

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