AccessibilityNodeInfo.GetBoundsInParent(Rect) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取 viewParent 坐标中的节点边界。
[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
参数
- outBounds
- Rect
输出节点边界。
- 特性
注解
获取 viewParent 坐标中的节点边界。
#getParent() 不表示源的 viewParent。 而是表示结果 View#getParentForAccessibility(),它返回最接近的上级,其中为 View#isImportantForAccessibility() true。 因此,此方法不可靠。
启用放大后,父级的边界也会通过放大比例纵向扩展。 例如,当放大比例为 2 时,它将返回原始边界 Rect(10、10、10、100、100)的 Rect(20、20、200、200)。
此成员已弃用。 改用 #getBoundsInScreen(Rect)。
Java文档android.view.accessibility.AccessibilityNodeInfo.getBoundsInParent(android.graphics.Rect)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。