Android ImageView ImageView ScaleType - CenterInside


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 less than the corresponding dimension of the view (minus padding).

Official Docs

It will center the image and resize it to the smaller size, if both container sizes are bigger it will act the same as center.

center inside 1

But if one of the sizes are small, it will fit to that size.

center inside 2