Is it possible to change launcher icon in android runtime with user selection? [duplicate]

╄→гoц情女王★ 提交于 2019-12-07 12:27:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!