ImageView ScaleType - FitStart and FitEnd
suggest changeScale the image with FIT_START.
Scale the image with FIT_END.
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"/>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents