List of usage examples for android.content.pm PackageManager getUserBadgedIcon
public abstract Drawable getUserBadgedIcon(Drawable icon, UserHandle user);
From source file:Main.java
/** * @see android.content.pm.PackageManager#getUserBadgedIcon(Drawable, android.os.UserHandle). *//*from w ww . j a v a 2s .co m*/ public static Drawable getUserBadgedIcon(Context context, int id) { Drawable drawable = getDrawable(context.getResources(), id); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { PackageManager packageManager = context.getPackageManager(); drawable = packageManager.getUserBadgedIcon(drawable, Process.myUserHandle()); } return drawable; }