Adham
Adham

Reputation: 64844

How to get the view coordinates in relativelayout in android

I want to get position of view located inside a RelativeLayout ?

Upvotes: 2

Views: 2549

Answers (1)

amukhachov
amukhachov

Reputation: 5900

You can use getLocationOnScreen method to detect position of your view and layout on screen. Then just calculate relative coordinates.

Upvotes: 2

Related Questions