Share via


AccessibilityNodeInfo.SetBoundsInParent(Rect) Method

Definition

Sets the node bounds in the viewParent's coordinates.

[Android.Runtime.Register("setBoundsInParent", "(Landroid/graphics/Rect;)V", "GetSetBoundsInParent_Landroid_graphics_Rect_Handler")]
public virtual void SetBoundsInParent (Android.Graphics.Rect? bounds);
[<Android.Runtime.Register("setBoundsInParent", "(Landroid/graphics/Rect;)V", "GetSetBoundsInParent_Landroid_graphics_Rect_Handler")>]
abstract member SetBoundsInParent : Android.Graphics.Rect -> unit
override this.SetBoundsInParent : Android.Graphics.Rect -> unit

Parameters

bounds
Rect

The node bounds.

Attributes

Exceptions

If called from an AccessibilityService.

Remarks

Sets the node bounds in the viewParent's coordinates. #getParent() does not represent the source's viewParent. Instead it represents the result of View#getParentForAccessibility(), which returns the closest ancestor where View#isImportantForAccessibility() is true. So this method is not reliable.

<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

This member is deprecated. Accessibility services should not care about these bounds.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(android.graphics.Rect).

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