react-native-dropdown-picker
react-native-dropdown-picker copied to clipboard
measureInWindow returns wrong value on Android
Hi everyone !
Many thanks for your work on this library
While I'm using it on Android, I have wrong values on pickerRef.current.measureInWindow((...args) => resolve(args)) (link here)
I added some logs during execution and that's the result :
pickerRef.current.measure() :
x = 0
y = 0
width = 416
height = 50
pageX = 16
pageY = 307
pickerRef.current.measureInWindow() :
x = 33349.33203125
y = 33640.33203125
width = 416
height = 50
As you can see, values for pickerRef.current.measureInWindow() are too high and whatever are other values in the formula (maxHeight, pickerHeight, and bottomOffset) the result will always be 'bottom' ...
I tried many mesures and I always have x = pageX + 33333 (and the same for y).
Some of you has any idea ?
Thank you very much for help !