Android Guides | Samples

Android.Widget.ImageView.SetImageURI Method

Sets the content of this ImageView to the specified Uri.

Syntax

[Android.Runtime.Register("setImageURI", "(Landroid/net/Uri;)V", "GetSetImageURI_Landroid_net_Uri_Handler")]
public virtual Void SetImageURI (Uri uri)

Parameters

uri
the Uri of an image, or null to clear the content

Remarks

Sets the content of this ImageView to the specified Uri.

This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using ImageView.SetImageDrawable(Drawable) or ImageView.SetImageBitmap(Bitmap) and BitmapFactory instead.

[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