cancel
Showing results for 
Search instead for 
Did you mean: 

Get absolute position of a Drawable?

Tuoman
Senior II

Is there function to get absolute position of Drawable? getX() returns relative position within container.

So if I have 3 nested containers, I must do:

container1->getX() + container2->getX() + container3->getX() + drawable1->getX()

Is this the intended way, or am I missing something?

1 REPLY 1
LTimm.1
Associate III

I haven't tried it myself lately, so a bit unsure, but maybe Drawable::getAbsoluteRect() is what you are looking for.