Compartilhar via


Icon.CreateWithResource Method

Definition

Overloads

CreateWithResource(Context, Int32)

Create an Icon pointing to a drawable resource.

CreateWithResource(String, Int32)

Create an Icon pointing to a drawable resource.

CreateWithResource(Context, Int32)

Create an Icon pointing to a drawable resource.

[Android.Runtime.Register("createWithResource", "(Landroid/content/Context;I)Landroid/graphics/drawable/Icon;", "", ApiSince=23)]
public static Android.Graphics.Drawables.Icon CreateWithResource (Android.Content.Context? context, int resId);
[<Android.Runtime.Register("createWithResource", "(Landroid/content/Context;I)Landroid/graphics/drawable/Icon;", "", ApiSince=23)>]
static member CreateWithResource : Android.Content.Context * int -> Android.Graphics.Drawables.Icon

Parameters

context
Context

The context for the application whose resources should be used to resolve the given resource ID.

resId
Int32

ID of the drawable resource

Returns

Attributes

Remarks

Create an Icon pointing to a drawable resource.

Java documentation for android.graphics.drawable.Icon.createWithResource(android.content.Context, int).

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

CreateWithResource(String, Int32)

Create an Icon pointing to a drawable resource.

[Android.Runtime.Register("createWithResource", "(Ljava/lang/String;I)Landroid/graphics/drawable/Icon;", "", ApiSince=23)]
public static Android.Graphics.Drawables.Icon CreateWithResource (string? resPackage, int resId);
[<Android.Runtime.Register("createWithResource", "(Ljava/lang/String;I)Landroid/graphics/drawable/Icon;", "", ApiSince=23)>]
static member CreateWithResource : string * int -> Android.Graphics.Drawables.Icon

Parameters

resPackage
String

Name of the package containing the resource in question

resId
Int32

ID of the drawable resource

Returns

Attributes

Remarks

Create an Icon pointing to a drawable resource.

Java documentation for android.graphics.drawable.Icon.createWithResource(java.lang.String, int).

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