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.
Asked
Active
Viewed 1.4k times
4 Answers
3
There are actually a number of ways to achieve this. If you notice Google's clock app these days, it does show the current time.
You can refer to this tutorial: https://blog.jakelee.co.uk/programmatically-changing-app-icon/
Or find even more ways here: How to change an application icon programmatically in Android?

Kamran Ahmed
- 7,661
- 4
- 30
- 55
2
As far as i know, you cant. Also refer to this answer:
-1
I am afraid you can't change your app's icon programmatically. How to change an application icon programmatically in Android?

Community
- 1
- 1

Mojo Risin
- 8,136
- 5
- 45
- 58
-10
This can be done easily. Within your activity code, just write:
getActionBar().setIcon(R.drawable.new_icon);

Muhammad Shahbaz
- 319
- 1
- 3
- 10