static android.graphics.Rect | getVisibleBoundsInScreen(android.view.accessibility.AccessibilityNodeInfo node, int width, int height)Returns the node's bounds clipped to the size of the display
if (node == null) {
return null;
}
// targeted node's bounds
Rect nodeRect = new Rect();
node.getBoundsInScreen(nodeRect);
Rect displayRect = new Rect();
displayRect.top = 0;
displayRect.left = 0;
displayRect.right = width;
displayRect.bottom = height;
nodeRect.intersect(displayRect);
return nodeRect;
|