But the labels have a width of 20 px and the space between them is 10 px, so I can’t understand these numbers.
I tried with Animation utilities and with @Mohamed_Tamer fantastic Component tools, but the numbers are the same.
I guess this has something to do with the Companion and the resolution of the device used to test, because the numbers are different if another device is used.
Anyway, I need to know how to get the exact X position of the labels A, B and C so I can move an sprite to the same X position, no matter wich device I’m using.
I would appreciate a little explanation about this topic.
Thanks in advance!
You need an extension like TaifunTools to get the density of screen. Normally it’s 3 for new cellphones.
So 360 * 3 = 1080, you will know the relationship
I tried with a factor of 3, but didn’t work either because I can’t understand the logic, I don’t know why two spaces in the same position in screen have different values for their X position.
Maybe the values are not accurate in Companion and only will be “logical” with APK?
Thanks for your answer!
Thanks Boban.
Ok, I understand that widths are measured in dp and position is given in px, but I can’t understand why two elements that in the screen have the same X position have different values for the X coordinate.
The coordinates are related to the arrangemet in wich they are and also depends on the configuration of that arrangement?
The X position of the two spaces in the blue rectangles is 1080 too.