Udostępnij za pośrednictwem


AccessibilityNodeInfo.MaxTextLength Property

Definition

Returns the maximum text length for this node. -or- Sets the maximum text length, or -1 for no limit.

public virtual int MaxTextLength { [Android.Runtime.Register("getMaxTextLength", "()I", "GetGetMaxTextLengthHandler")] get; [Android.Runtime.Register("setMaxTextLength", "(I)V", "GetSetMaxTextLength_IHandler")] set; }
[<get: Android.Runtime.Register("getMaxTextLength", "()I", "GetGetMaxTextLengthHandler")>]
[<set: Android.Runtime.Register("setMaxTextLength", "(I)V", "GetSetMaxTextLength_IHandler")>]
member this.MaxTextLength : int with get, set

Property Value

The maximum text length, or -1 for no limit.

Attributes

Exceptions

If called from an AccessibilityService.

Remarks

Property getter documentation:

Returns the maximum text length for this node.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.getMaxTextLength().

Property setter documentation:

Sets the maximum text length, or -1 for no limit.

Typically used to indicate that an editable text field has a limit on the number of characters entered.

<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.setMaxTextLength(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

See also