LauncherApps.GetShortcutIconDrawable(ShortcutInfo, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the icon for this shortcut, without any badging for the profile.
[Android.Runtime.Register("getShortcutIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)]
public virtual Android.Graphics.Drawables.Drawable? GetShortcutIconDrawable (Android.Content.PM.ShortcutInfo shortcut, int density);
[<Android.Runtime.Register("getShortcutIconDrawable", "(Landroid/content/pm/ShortcutInfo;I)Landroid/graphics/drawable/Drawable;", "GetGetShortcutIconDrawable_Landroid_content_pm_ShortcutInfo_IHandler", ApiSince=25)>]
abstract member GetShortcutIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable
override this.GetShortcutIconDrawable : Android.Content.PM.ShortcutInfo * int -> Android.Graphics.Drawables.Drawable
Parameters
- shortcut
- ShortcutInfo
- density
- Int32
The preferred density of the icon, zero for default density. Use
density DPI values from DisplayMetrics
.
Returns
The drawable associated with the shortcut.
- Attributes
Remarks
Returns the icon for this shortcut, without any badging for the profile.
The calling launcher application must be allowed to access the shortcut information, as defined in #hasShortcutHostPermission()
.
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.