Sdílet prostřednictvím


View.StateDescriptionFormatted Property

Definition

Returns the View's state description. -or- Sets the View's state description.

public Java.Lang.ICharSequence? StateDescriptionFormatted { [Android.Runtime.Register("getStateDescription", "()Ljava/lang/CharSequence;", "", ApiSince=30)] get; [Android.Runtime.Register("setStateDescription", "(Ljava/lang/CharSequence;)V", "GetSetStateDescription_Ljava_lang_CharSequence_Handler", ApiSince=30)] set; }
[<get: Android.Runtime.Register("getStateDescription", "()Ljava/lang/CharSequence;", "", ApiSince=30)>]
[<set: Android.Runtime.Register("setStateDescription", "(Ljava/lang/CharSequence;)V", "GetSetStateDescription_Ljava_lang_CharSequence_Handler", ApiSince=30)>]
member this.StateDescriptionFormatted : Java.Lang.ICharSequence with get, set

Property Value

the state description

Attributes

Remarks

Property getter documentation:

Returns the View's state description.

<strong>Note:</strong> Do not override this method, as it will have no effect on the state description presented to accessibility services. You must call #setStateDescription(CharSequence) to modify the state description.

Java documentation for android.view.View.getStateDescription().

Property setter documentation:

Sets the View's state description.

A state description briefly describes the states of the view and is primarily used for accessibility support to determine how the states of a view should be presented to the user. It is a supplement to the boolean states (for example, checked/unchecked) and it is used for customized state description (for example, "wifi, connected, three bars"). State description changes frequently while content description should change less often. State description should be localized. For android widgets which have default state descriptions, app developers can call this method to override the state descriptions. Setting state description to null restores the default behavior.

Java documentation for android.view.View.setStateDescription(java.lang.CharSequence).

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