Reputation: 3355
Usually the icon is fixed. But I want to make an application: when user presses the icon, it won't open any new UI but just change the icon itself. That means it has only two status and can be changed by users pressing on it.
Are some code examples available for this?
As you can see from below screenshots of my phone. The app icon represents a cleaner. When I press it, the 2nd picture shows that the icon changes and it won't enter any UI, just shows the percent of phone's processes cleaning status. I want to make an app with this effect.
Upvotes: 1
Views: 752
Reputation: 1006674
You cannot change your application icon at runtime, in terms of what is displayed by the home screen in its launcher.
You are welcome to write a home screen app widget that can respond to user input and can change its UI.
Upvotes: 5