0% found this document useful (0 votes)
8 views5 pages

ImageView AdjustViewBounds and Tinting

Uploaded by

avinash B
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

ImageView AdjustViewBounds and Tinting

Uploaded by

avinash B
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

ImageView

Image view will Displays image resources, for


example Bitmap or Drawable resources.

ImageView is also commonly used to apply tints to an


image and handle image scaling.
ATTRIBUTE
android:adjustViewBounds Set this to true if you want the
ImageView to adjust its bounds to
preserve the aspect ratio of its
drawable.
android:baseline The offset of the baseline within this
view.
android:baselineAlignBottom If true, the image view will be baseline
aligned with based on its bottom edge.
android:cropToPadding If true, the image will be cropped to fit
within its padding.
android:maxHeight An optional argument to supply a
maximum height for this view.
android:maxWidth An optional argument to supply a
maximum width for this view.
android:scaleType Controls how the image should
be resized or moved to match
the size of this ImageView.
android:src Sets a drawable as the content
of this ImageView.
android:tint The tinting color for the image.
android:tintMode Blending mode used to apply the
image tint.
Tint mode:To set tint color and tint mode for
ImageView in Kotlin Android, set app:tint and
android:tintMode attributes of ImageView in layout
file with required color and tint mode respectively.

 The following list specifies the possible values for tint


mode.
o add
o multiply
o screen
o src_atop
o src_in
o src_over

You might also like