问题
In my app I want to display different icons for the application. Changes should be according to the scenario. For example, it will mark the number of days remaining for the task completion. On the android menu this icon will display the number of days remaining. If anyone has any idea for this, I would appreciate it. Thanks.
回答1:
As far as i know, you cant. Also refer to this answer:
Android Application Icon Change
回答2:
I am afraid you can't change your app's icon programmatically. How to change an application icon programmatically in Android?
回答3:
This can be done easily. Within your activity code, just write:
getActionBar().setIcon(R.drawable.new_icon);
来源:https://stackoverflow.com/questions/6043902/android-application-icon-changes-with-runtime