I have a layout like this:
<LinearLayout
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="8dp"
android:gravity="start|center_vertical"
android:orientation="horizontal"
android:layout_weight="0.25">
<ImageView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:background="@drawable/reply_icon"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
/>
</LinearLayout>
I'm trying to get the ImageView to fit its height (20dp
) and auto-adjust the width (while keeping its aspect ratio), however, it comes out looking stretched like this:
How can I fix this?