Learning Android Development
Android Matrix ScaleType Explained
Making a custom scaling transformation on Android Image
Published in
5 min readSep 26, 2020
Understanding Android Image ScaleTypes is essential for any Android Developer. The basic ones are all explained below, except for Matrix
In a normal situation, there’s no need of using Matrix ScaleType. Nonetheless, for something more interesting as below, we will need Matrix ScaleType.
The Matrix ScaleType
To set up a matrix scale type, it is just as simple as below.
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image_picture"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/lion"
android:scaleType="matrix" />