Android Question Notification icon

pierrem

Member
Licensed User
Longtime User
Hi,

some trouble with notification icon....

The idea for this test app is to change the icon in the status bar depending on wich button is clicked in the app (not a real app ... just to learn).
I put in Object/res/drawable 2 files (read only) named iconon.png, iconoff.png.
One more is named just icon.png

when pressing button, I expected the right .png loaded ... but no

where is my mistake ?

thanks in advance
 

Attachments

  • notification.zip
    9.1 KB · Views: 101

barx

Well-Known Member
Licensed User
Longtime User
In your example you are using either "icon" or "iconon". both of these look the same.

Use "iconoff" or "iconon" AND I noticed that you spelt iconoff wrong which causes it to show nothing ;)
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Here is the working example
 

Attachments

  • example.zip
    9 KB · Views: 123
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
No worries ;)
 
Upvote 0
Top