Android Guides | Samples

Android.Widget.ImageView Class

Displays an arbitrary image, such as an icon.

See Also: ImageView

Syntax

[Android.Runtime.Register("android/widget/ImageView", DoNotGenerateAcw=true)]
public class ImageView : View

Remarks

Displays an arbitrary image, such as an icon. The ImageView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the image so that it can be used in any layout manager, and provides various display options such as scaling and tinting.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.ImageView are listed below.

See Also: View

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
AdjustViewBoundsBoolean. True when ImageView is adjusting its bounds to preserve the aspect ratio of its drawable
BaselineAlignBottomBoolean. Return whether this view's baseline will be considered the bottom of the view.
[read-only]
ColorFilterColorFilter. Returns the active color filter for this ImageView.
CropToPaddingBoolean. Return whether this ImageView crops to padding.
[read-only]
DrawableDrawable. Return the view's drawable, or null if no drawable has been assigned.
ImageAlphaInt32. Returns the alpha that will be applied to the drawable of this ImageView.
ImageMatrixMatrix. Return the view's optional matrix.
ImageTintListColorStateList.
ImageTintModePorterDuff+Mode.
[read-only]
MaxHeightInt32. The maximum height of this view.
[read-only]
MaxWidthInt32. The maximum width of this view.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

ClearColorFilter()
GetScaleType() : ImageView+ScaleType
Return the current scale type in use by this ImageView.
OnCreateDrawableState(Int32) : Int32[]
Generate the new Drawable state for this view.
SetAdjustViewBounds(Boolean)
Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
SetAlpha(Int32)
Sets the alpha value that should be applied to the image.
SetBaseline(Int32)
SetColorFilter(Color)
Set a tinting option for the image.
SetColorFilter(ColorFilter)
Apply an arbitrary colorfilter to the image.
SetColorFilter(Color, PorterDuff+Mode)
Set a tinting option for the image.
SetImageBitmap(Bitmap)
Sets a Bitmap as the content of this ImageView.
SetImageDrawable(Drawable)
Sets a drawable as the content of this ImageView.
SetImageLevel(Int32)
Sets the image level, when it is constructed from a LevelListDrawable.
SetImageResource(Int32)
Sets a drawable as the content of this ImageView.
SetImageState(Int32[], Boolean)
SetImageURI(Uri)
Sets the content of this ImageView to the specified Uri.
SetMaxHeight(Int32)
An optional argument to supply a maximum height for this view.
SetMaxWidth(Int32)
An optional argument to supply a maximum width for this view.
SetScaleType(ImageView+ScaleType)
Controls how the image should be resized or moved to match the size of this ImageView.

Protected Methods

SetFrame(Int32, Int32, Int32, Int32) : Boolean
Assign a size and position to this view.