AccessibilityNodeInfo.TextFormatted Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the text of this node. -or- Sets the text of this node.
public virtual Java.Lang.ICharSequence? TextFormatted { [Android.Runtime.Register("getText", "()Ljava/lang/CharSequence;", "GetGetTextHandler")] get; [Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;)V", "GetSetText_Ljava_lang_CharSequence_Handler")] set; }
[<get: Android.Runtime.Register("getText", "()Ljava/lang/CharSequence;", "GetGetTextHandler")>]
[<set: Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;)V", "GetSetText_Ljava_lang_CharSequence_Handler")>]
member this.TextFormatted : Java.Lang.ICharSequence with get, set
Property Value
The text.
- Attributes
Exceptions
If called from an AccessibilityService.
Remarks
Property getter documentation:
Gets the text of this node.
<strong>Note:</strong> If the text contains ClickableSpan
s or URLSpan
s, these spans will have been replaced with ones whose ClickableSpan#onClick(View)
can be called from an AccessibilityService
. When called from a service, the View
argument is ignored and the corresponding span will be found on the view that this AccessibilityNodeInfo
represents and called with that view as its argument.
This treatment of ClickableSpan
s means that the text returned from this method may different slightly one passed to #setText(CharSequence)
, although they will be equivalent according to TextUtils#equals(CharSequence, CharSequence)
. The ClickableSpan#onClick(View)
of any spans, however, will generally not work outside of an accessibility service.
Java documentation for android.view.accessibility.AccessibilityNodeInfo.getText()
.
Property setter documentation:
Sets the text of this node.
<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService
. This class is made immutable before being delivered to an AccessibilityService.
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.