How to get the Dimensions of a Drawable in an ImageView? [duplicate]
This question already has an answer here: How to get the width and height of an android.widget.ImageView? 10 answers What is the best way to retrieve the dimensions of the Drawable in an ImageView? My ImageView has an Init-Method where i create the ImageView: private void init() { coverImg = new ImageView(context); coverImg.setScaleType(ScaleType.FIT_START); coverImg.setImageDrawable(getResources().getDrawable(R.drawable.store_blind_cover)); addView(coverImg); } At some point during the layout oder measure process i need the exact dimensions of the Drawable to adjust the rest of my Components