╔══════════════════════════════════════════════╗ ^
║ ImageView ╔══════════════╗ ║ |
║ ║ ║ ║ |
║
The reason the ImageView's dimentions are 0 is because when you are querying them, the view still haven't performed the layout and measure steps. You only told the view how it would "behave" in the layout, but it still didn't calculated where to put each view.
How do you decide the size to give to the image view? Can't you simply use one of the scaling options natively implemented?