Condividi tramite


View.ContentDescriptionFormatted Property

Definition

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

public virtual Java.Lang.ICharSequence? ContentDescriptionFormatted { [Android.Runtime.Register("getContentDescription", "()Ljava/lang/CharSequence;", "GetGetContentDescriptionHandler")] get; [Android.Runtime.Register("setContentDescription", "(Ljava/lang/CharSequence;)V", "GetSetContentDescription_Ljava_lang_CharSequence_Handler")] set; }
[<get: Android.Runtime.Register("getContentDescription", "()Ljava/lang/CharSequence;", "GetGetContentDescriptionHandler")>]
[<set: Android.Runtime.Register("setContentDescription", "(Ljava/lang/CharSequence;)V", "GetSetContentDescription_Ljava_lang_CharSequence_Handler")>]
member this.ContentDescriptionFormatted : Java.Lang.ICharSequence with get, set

Property Value

the content description

Attributes

Remarks

Property getter documentation:

Returns the View's content description.

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

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

Property setter documentation:

Sets the View's content description.

A content description briefly describes the view and is primarily used for accessibility support to determine how a view should be presented to the user. In the case of a view with no textual representation, such as android.widget.ImageButton, a useful content description explains what the view does. For example, an image button with a phone icon that is used to place a call may use "Call" as its content description. An image of a floppy disk that is used to save a file may use "Save".

This should omit role or state. Role refers to the kind of user-interface element the View is, such as a Button or Checkbox. State refers to a frequently changing property of the View, such as an On/Off state of a button or the audio level of a volume slider.

Content description updates are not frequent, and are used when the semantic content - not the state - of the element changes. For example, a Play button might change to a Pause button during music playback.

Java documentation for android.view.View.setContentDescription(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