How is appium computing bound for android elements?

Hi,
I’m using react-native-svg (https://github.com/react-native-community/react-native-svg) and there seems to be an issue with the “bounds” of elements from that library. the bounds seem to have a wrong bottom,right coordinate (the latter numbers), e.g. [424,1072],[42,749]. the top,left seems ok…but others are visibly wrong…and then the elements are invisible and i cant click them. what a mess.

Im fairly sure that the error has to do with something incorrectly defined in the react-native-svg.
I’d like to help there, but I don’t know which property Appium reads the bounds from, so i can fix it. or how it computes it. couldn’t find the right place in the open sources code, so i would really appreciated if anyone could answer:

How Are Bounds computed for Android views?

Gal.

why not to check with https://developer.android.com/training/testing/ui-automator#ui-automator-viewer ?

For UIA2 driver bounds are computed based on the Accessibility info: https://github.com/appium/appium-uiautomator2-server/blob/fa7f5d24bb0b57bb48aa2f852271e69d663968a1/app/src/main/java/io/appium/uiautomator2/core/AccessibilityNodeInfoHelpers.java#L97

thank you both! @Aleksei this is a good idea for debugging. and @mykola-mokhnach this is just what i needed! with the computation i can easily understand what’s going on. amazing!