ImageView ScaleType - FitStart and FitEnd

suggest change

Scale the image with FIT_START.

Scale the image with FIT_END.

Official Docs

FitStart

This scales the image so it fits inside the container and aligns it to the start.

<ImageView android:layout_width="200dp"
           android:layout_height="200dp"
           android:src="@mipmap/ic_launcher"
           android:id="@+id/imageView"
           android:scaleType="fitStart"
           android:layout_gravity="center"
           android:background="@android:color/holo_orange_light"/>

FitEnd

This scales the image so it fits inside the container and aligns it to the end.

<ImageView android:layout_width="200dp"
           android:layout_height="100dp"
           android:src="@mipmap/ic_launcher"
           android:id="@+id/imageView"
           android:scaleType="fitEnd"
           android:layout_gravity="center"
           android:background="@android:color/holo_orange_light"/>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents