问题
I want to use multiple launcher icon . what i want that user can change launcher icon with his selection
is it possible to change launcher icon run time?
回答1:
Strictly speaking you can not change launcher icon at run time. However there are few workarounds available for this:
1. Activity alias:
Create multiple activity-alias
tags in Manifest for your MAIN
launcher activity and give a different icon drawable
to it. You can then choose a particular activity-alias
via your code as per your requirement.
2. Install/Uninstall Shortcuts: This approach won't change the your app's icon however you can update (read re-install) your app's shortcut-icon.
Hope this helps.
来源:https://stackoverflow.com/questions/29936645/is-it-possible-to-change-launcher-icon-in-android-runtime-with-user-selection