I need an ImageView in which the user of my app loads an image from his gallery or camera. If the image is landscape, the ImageView width should be equal to screen width. If the image is portrait, the ImageView should take up as much screen space as there is available (I have a view above and a view below the ImageView). How can I achieve this?
Below is the desired result: