Partager via


LauncherApps.GetShortcutBadgedIconDrawable(ShortcutInfo, Int32) Method

Definition

Returns the shortcut icon with badging appropriate for the profile.

[Android.Runtime.Register("getShortcutBadgedIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutBadgedIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)]
public virtual Android.Graphics.Drawables.Drawable? GetShortcutBadgedIconDrawable (Android.Content.PM.ShortcutInfo? shortcut, int density);
[<Android.Runtime.Register("getShortcutBadgedIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutBadgedIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)>]
abstract member GetShortcutBadgedIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable
override this.GetShortcutBadgedIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable

Parameters

shortcut
ShortcutInfo
density
Int32

Optional density for the icon, or 0 to use the default density. Use

Returns

A badged icon for the shortcut.

Attributes

Remarks

Returns the shortcut icon with badging appropriate for the profile.

The calling launcher application must be allowed to access the shortcut information, as defined in #hasShortcutHostPermission().

Java documentation for android.content.pm.LauncherApps.getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, 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