Create your account

Already have an account? Login here

Create account

44. Image View Scale Types Illustrated

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to buy this course, or login to your account to view this lesson.

Alright, buy it for $25 Or login to your account if you purchased already.

This video illustrates the different scale types supported by widgets that are capable of displaying Images in Android. Centre displays the image centred in the view with no scaling. centerCrop scales the image such that both the x and y dimensions are greater than or equal to the view, while maintaining the image aspect ratio; crops any part of the image that exceeds the size of the view; centres the image in the view. centerInside scales the image to fit inside the view, while maintaining the image aspect ratio. If the image is already smaller than the view, then this is the same as centre. fitCenter scales the image to fit inside the view, while maintaining the image aspect ratio. At least one axis will exactly match the view, and the result is centred inside the view. fitStart same as fitCenter but aligned to the top left of the view. fitEnd same as fitCenter but aligned to the bottom right of the view. itXY scales the x and y dimensions to exactly match the view size; does not maintain the image aspect ratio. matrix scales the image using a supplied Matrix class. The matrix can be supplied using the setImageMatrix method. A Matrix class can be used to apply transformations such as rotations to an image.

Course Cirriculum