<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:minHeight="400dp"
android:background="@android:color/black"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/invitation_imageview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_margin="1dp"
android:scaleType="centerCrop"
/>
<ImageView
android:id="@+id/invitation_avatar_view_1"
android:layout_width="28dp"
android:layout_height="28dp"
android:scaleType="centerCrop"
android:layout_margin="6dp" />
</LinearLayout>
Hi all, this is my layout and I have an issue that if i put smaller image for example 60*60 - px to this layout my view is just around 60 pixel tall. but the image is stretched as it should be, I added minimum height to layout, but it does not solve my problem exactly because that number could be different based on the width of the device. What should I do to have always shown my whole imageview and have the wrap content as well, and not to play with some minHeight?