Android Summary: The scaleType attribute of ImageView, imageviewscaletype
In Android, The scaleType of ImageView has eight options.
1 matrix does not scale the image, and draws the image from the upper left corner of the view (the image is not deformed );
2. fitXY draws all the images to the view, but the images are deformed. (The picture is deformed and full of views)
3 fitStart, fitCenter, and fitEnd attributes use the longer side of the image as the benchmark to scale the image. Because of this, the image will not be fully filled with views, the difference is that the anchor points drawn by the image in the view are different. (The image is not deformed and cannot be filled with the view)
4. The center does not scale the image. Select the center of the view and image to draw the image. (The image is not deformed)
5. centerCrop ensures that the image is full of views. Therefore, the shorter side of the image is selected as the benchmark for scaling. (The image is not deformed and full of views)
6 centerInside ensures that the image is displayed in the middle of the view. When the image is larger than the view, the longer side of the image is selected as the reference to narrow down the image. When the width and height of the image are smaller than the view, directly display the image in the middle of the view. (Images are not deformed)