Icon.LoadDrawable(Context) Method

Definition

Returns a Drawable that can be used to draw the image inside this Icon, constructing it if necessary.

[Android.Runtime.Register("loadDrawable", "(Landroid/content/Context;)Landroid/graphics/drawable/Drawable;", "", ApiSince=23)]
public Android.Graphics.Drawables.Drawable? LoadDrawable (Android.Content.Context? context);
[<Android.Runtime.Register("loadDrawable", "(Landroid/content/Context;)Landroid/graphics/drawable/Drawable;", "", ApiSince=23)>]
member this.LoadDrawable : Android.Content.Context -> Android.Graphics.Drawables.Drawable

Parameters

context
Context

android.content.Context Context in which to load the drawable; used to access android.content.res.Resources Resources, for example.

Returns

A fresh instance of a drawable for this image, yours to keep.

Attributes

Remarks

Returns a Drawable that can be used to draw the image inside this Icon, constructing it if necessary. Depending on the type of image, this may not be something you want to do on the UI thread, so consider using #loadDrawableAsync(Context, Message) loadDrawableAsync instead.

Java documentation for android.graphics.drawable.Icon.loadDrawable(android.content.Context).

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