Say I have a cat.png
in my drawable-hdpi
folder, with dimension 100*100 px. Now if I load this picture using an ImageView whose size is set to "wrap_content":
cat_image.setImageResource(R.drawable.cat);
How can I know the size of the image view (in pixels) without calling "getHeight()"? There must be a relationship between the size of image view and the number "100", but I tried to convert "100" from DP to PX, and from PX to DP, etc, with no success.