Reputation: 29
1-android:scaleTaype="center"
2-android:scaleTaype="centerCrop"
What is the difference between 1 and 2?
Upvotes: 2
Views: 4937
Reputation: 1082
CENTER :- Center the image in the view, but perform no scaling.
CENTER_CROP :- Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). The image is then centered in the view.
Refer to this official documentation for a overview of all the ScaleTypes and this site for a detailed explanation
Upvotes: 8