Partager via


View.AccessibilityTraversalAfter Property

Definition

Gets the id of a view after which this one is visited in accessibility traversal. -or- Sets the id of a view that screen readers are requested to visit before this view.

public virtual int AccessibilityTraversalAfter { [Android.Runtime.Register("getAccessibilityTraversalAfter", "()I", "GetGetAccessibilityTraversalAfterHandler", ApiSince=22)] get; [Android.Runtime.Register("setAccessibilityTraversalAfter", "(I)V", "GetSetAccessibilityTraversalAfter_IHandler", ApiSince=22)] set; }
[<get: Android.Runtime.Register("getAccessibilityTraversalAfter", "()I", "GetGetAccessibilityTraversalAfterHandler", ApiSince=22)>]
[<set: Android.Runtime.Register("setAccessibilityTraversalAfter", "(I)V", "GetSetAccessibilityTraversalAfter_IHandler", ApiSince=22)>]
member this.AccessibilityTraversalAfter : int with get, set

Property Value

The id of a view this one succeedes in accessibility traversal if specified, otherwise #NO_ID.

Attributes

Remarks

Property getter documentation:

Gets the id of a view after which this one is visited in accessibility traversal.

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

Property setter documentation:

Sets the id of a view that screen readers are requested to visit before this view.

For example, if view B should be visited after A, with B.setAccessibilityTraversalAfter(A), then this requests that screen readers visit and traverse view A before visiting view B.

<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.setAccessibilityTraversalAfter(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