Getting ImageView dimensions before adding the image
- by twk
I've got a RelativeLayout that contains these items:
LinearLayout
ImageView (weight = 1)
LinearLayout
So, the ImageView should expand and pin the other layouts on the top/bottom of the screen.
I'm loading the ImageView using an image stored on a web server. However, I can fetch images of any size from the server, so I'd rather just fetch the exact image size I need. Thus, I need to get the size of the ImageView before I actually fill it in. How can I do this?