View.AccessibilityTraversalBefore 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 id of a view before which this one is visited in accessibility traversal. -or- Sets the id of a view that screen readers are requested to visit after this view.
public virtual int AccessibilityTraversalBefore { [Android.Runtime.Register("getAccessibilityTraversalBefore", "()I", "GetGetAccessibilityTraversalBeforeHandler", ApiSince=22)] get; [Android.Runtime.Register("setAccessibilityTraversalBefore", "(I)V", "GetSetAccessibilityTraversalBefore_IHandler", ApiSince=22)] set; }
[<get: Android.Runtime.Register("getAccessibilityTraversalBefore", "()I", "GetGetAccessibilityTraversalBeforeHandler", ApiSince=22)>]
[<set: Android.Runtime.Register("setAccessibilityTraversalBefore", "(I)V", "GetSetAccessibilityTraversalBefore_IHandler", ApiSince=22)>]
member this.AccessibilityTraversalBefore : int with get, set
Property Value
The id of a view this one precedes in accessibility traversal if
specified, otherwise #NO_ID
.
- Attributes
Remarks
Property getter documentation:
Gets the id of a view before which this one is visited in accessibility traversal.
Java documentation for android.view.View.getAccessibilityTraversalBefore()
.
Property setter documentation:
Sets the id of a view that screen readers are requested to visit after this view.
For example, if view B should be visited before view A, with B.setAccessibilityTraversalBefore(A), this requests that screen readers visit and traverse view B before visiting view A.
<b>Note:</b> Views are visited in the order determined by the screen reader. Avoid explicitly manipulating focus order, as this may result in inconsistent user experiences between apps. Instead, use other semantics, such as restructuring the view hierarchy layout, to communicate order.
Setting this view to be after a view that is not important for accessibility, or if this view is not important for accessibility, means this method will have no effect if the service is not aware of unimportant views.
To avoid a risk of loops, set clear relationships between views. For example, if focus order should be B -> A, and B.setAccessibilityTraversalBefore(A), then also call A.setAccessibilityTraversalAfter(B).
Java documentation for android.view.View.setAccessibilityTraversalBefore(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.