1

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!

toto_tata
  • 14,526
  • 27
  • 108
  • 198
  • 1
    "I don't see how to do that" -- that is because generally it is not an option. The determination of what to show is made between the OS (which wants what your first image shows) and the launcher. If the launcher elects to do something other than what it gets from the OS, then it's up to the launcher developers for what they do. There are hundreds of launchers. – CommonsWare Oct 14 '22 at 17:13

0 Answers0