How can we change android application icon dynamically in Android

I know that same kind of question has been asked for activity icon, but my question is little bit different.

I just wanted to know whether we can set the application icon programmatically, I am not asking to change, I am just asking for setting it. I hope I am clear.

<application android:icon="drawable resource"> </application>

In the above example I am setting it in manifest file, but instead of manifest can I set it through java code.


As you can read here http://developer.android.com/guide/topics/manifest/manifest-intro.html the default's app icon is set in the manifest. As manifest is located in the app's /root it cannot be modified, so there's no way to do it. You may consider that if you could change it while the app is running, changes wouldn't be saved in the manifest.


清单不能动态改变,但它招你可以删除图标应用程序,然后添加你喜欢的图标这里是链接:如何在Android中以编程方式更改应用程序图标?

链接地址: http://www.djcxy.com/p/18568.html

上一篇: 我可以制作像C ++流一样的printf格式文件吗?

下一篇: 我们如何在Android中动态更改Android应用程序图标