Taal

ImageDecoder.DecodeDrawable Method

Definition

Overloads

Name Description
DecodeDrawable(ImageDecoder+Source, ImageDecoder+IOnHeaderDecodedListener)

See #decodeDrawable(Source, OnHeaderDecodedListener).

DecodeDrawable(ImageDecoder+Source)

See #decodeDrawable(Source, OnHeaderDecodedListener).

DecodeDrawable(ImageDecoder+Source, ImageDecoder+IOnHeaderDecodedListener)

See #decodeDrawable(Source, OnHeaderDecodedListener).

[Android.Runtime.Register("decodeDrawable", "(Landroid/graphics/ImageDecoder$Source;Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;)Landroid/graphics/drawable/Drawable;", "", ApiSince=28)]
public static Android.Graphics.Drawables.Drawable DecodeDrawable(Android.Graphics.ImageDecoder.Source src, Android.Graphics.ImageDecoder.IOnHeaderDecodedListener listener);
[<Android.Runtime.Register("decodeDrawable", "(Landroid/graphics/ImageDecoder$Source;Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;)Landroid/graphics/drawable/Drawable;", "", ApiSince=28)>]
static member DecodeDrawable : Android.Graphics.ImageDecoder.Source * Android.Graphics.ImageDecoder.IOnHeaderDecodedListener -> Android.Graphics.Drawables.Drawable

Parameters

src
ImageDecoder.Source

representing the encoded image. This value cannot be null.

listener
ImageDecoder.IOnHeaderDecodedListener

A listener for inspecting the ImageInfo and changing the ImageDecoder settings. It is called on the same thread as decodeDrawable before that method returns. This value cannot be null.

Returns

Drawable for displaying the image. This value cannot be null.

Attributes

Remarks

Create a Drawable from a Source. This method may take several seconds to complete, so it should only be called from a worker thread.

Android reference for android.graphics.ImageDecoder.decodeDrawable.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

DecodeDrawable(ImageDecoder+Source)

See #decodeDrawable(Source, OnHeaderDecodedListener).

[Android.Runtime.Register("decodeDrawable", "(Landroid/graphics/ImageDecoder$Source;)Landroid/graphics/drawable/Drawable;", "", ApiSince=28)]
public static Android.Graphics.Drawables.Drawable DecodeDrawable(Android.Graphics.ImageDecoder.Source src);
[<Android.Runtime.Register("decodeDrawable", "(Landroid/graphics/ImageDecoder$Source;)Landroid/graphics/drawable/Drawable;", "", ApiSince=28)>]
static member DecodeDrawable : Android.Graphics.ImageDecoder.Source -> Android.Graphics.Drawables.Drawable

Parameters

src
ImageDecoder.Source

representing the encoded image. This value cannot be null.

Returns

Drawable for displaying the image. This value cannot be null.

Attributes

Remarks

Create a Drawable from a Source.

This overload does not take a per-decode listener. A thread or process default listener may still change the decoder settings. To provide a listener for this decode, use DecodeDrawable(ImageDecoder+Source, ImageDecoder+IOnHeaderDecodedListener).

This method may take several seconds to complete, so it should only be called from a worker thread.

Android reference for android.graphics.ImageDecoder.decodeDrawable.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to