How to fit an image of random size to an ImageView? When:
ImageView
After searching for a day, I think this is the easiest solution:
imageView.getLayoutParams().width = 250; imageView.getLayoutParams().height = 250; imageView.setAdjustViewBounds(true);