Like this: Drawable shortcutIconDrawable = null;
Parcelable iconResourceParcelable = shortcutData.getParcelable(Intent.EXTRA_SHORTCUT_ICON_RESOURCE); if (iconResourceParcelable != null && iconResourceParcelable instanceof Intent.ShortcutIconResource) { Intent.ShortcutIconResource iconResource = (Intent.ShortcutIconResource)iconResourceParcelable Resources resources = getPackageManager().getResourcesForApplication(iconResource.packageName); if (resources != null) { int id = resources.getIdentifier(iconResource.resourceName, null, null); shortcutIconDrawable = resources.getDrawable(id); } On Apr 1, 10:22 am, b_t <bartata...@gmail.com> wrote: > Hi, > > When I pick a shortcut I can get a ShortcutIconResource from the > intent (Intent.EXTRA_SHORTCUT_ICON_RESOURCE). > I would like to display this icon. How can I get a Bitmap or Drawable > from it? > > Thanks, > T. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en