Share via


AccessibilityNodeInfo.GetBoundsInParent(Rect) Method

Definition

Gets the node bounds in the viewParent's coordinates.

[Android.Runtime.Register("getBoundsInParent", "(Landroid/graphics/Rect;)V", "GetGetBoundsInParent_Landroid_graphics_Rect_Handler")]
public virtual void GetBoundsInParent (Android.Graphics.Rect? outBounds);
[<Android.Runtime.Register("getBoundsInParent", "(Landroid/graphics/Rect;)V", "GetGetBoundsInParent_Landroid_graphics_Rect_Handler")>]
abstract member GetBoundsInParent : Android.Graphics.Rect -> unit
override this.GetBoundsInParent : Android.Graphics.Rect -> unit

Parameters

outBounds
Rect

The output node bounds.

Attributes

Remarks

Gets 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.

When magnification is enabled, the bounds in parent are also scaled up by magnification scale. For example, it returns Rect(20, 20, 200, 200) for original bounds Rect(10, 10, 100, 100), when the magnification scale is 2. <p/>

This member is deprecated. Use #getBoundsInScreen(Rect) instead.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.getBoundsInParent(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