I am trying to get the x and y coordinates of the center of the screen. Here is what i tried:
Display display = getWindowManager().getDefaultDisplay(); final
I guess you're correctly getting the center coordinates, but setY is setting the position of the bottom edge of your ImageView. Off the top of my head, you may try something like
setY
ImageView
SomeImageView.setY(height - SomeImageView.getDrawable().getIntrinsicHeight());