I am attaching an imageview up on my frame layout. Here i want to get my imageview center co-ordinates. i will use that same co-ordinates to set my imageview in next layout.
As @aiueoH mentioned, you can use getPivotX() and getPivotY().
getPivotX() and getPivotY()
Try using this for finding coordinates of centre:
int centreX = view.getPivotX()/2; int centreY = view.getPivotY()/2;