imageview height as the wrap_content of the shown image August 3, 2023 by Tarik You have to set adjustViewBounds to true. imageView.setAdjustViewBounds(true);