Get position of imageview on layout android

At runtime you can get the location of every View object (this includes Layouts too) with

Left Position of View Object getleft()

Top Position of View Object getTop()

Right Position of View Object getRight()

Bottom Position of View Object getBottom()

Even you can get the location with

getLocationOnScreen(int [] )


x = imageViewObject.getLeft();
y = imageViewObject.getTop();

Hope, it help you!


Position meaning x and y and height and width?

This layout is a view, that view has these properties.


You can use this with getLocationOnScreen(int [])