Android shortcuts : how to change the small icon of the shortcut icon?

495 Views Asked by At

I create a pinned shortcut for my app using:

ShortcutInfo.Builder mShortcutInfoBuilder = new ShortcutInfo.Builder(MainActivity.this, getString(R.string.app_name));
...
mShortcutInfoBuilder.setIcon(Icon.createWithBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.shortcut_icon)));
...
mShortcutManager.requestPinShortcut(mShortcutInfo, null);

as mentioned here.

The shortcut created on the desktop looks like this:

enter image description here

The big shortcut icon is the one defined by:

mShortcutInfoBuilder.setIcon(Icon.createWithBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.shortcut_icon)));

But it is not what I want. I want to modify the small icon at the bottom right, because I think that it is more logical to have my default app icon big, and my shortcut icon small. I don't see how to do that.

What I want:

enter image description here

Any idea?

Thanks a lot!

0

There are 0 best solutions below