Android Tutorial ToggleButton on MenuItem

Hi,

Is it possible to use a kind of ToggleButton as a MenuItem?

I tried to us a bitmap variable and changed it after the menuclick, but the image is not refreshed, so this won't work.

Thanks,
André
 

klaus

Expert
Licensed User
Longtime User
Sorry, but I don't really understand what exactly you want to do ?

- Do you want to have ToggleButton to act as a menu, meaning executing two different functions depending on the state ?
Yes, can be done easily !

- Do want to have a MenuItem acting like a ToggleButton, meaning changing the text and or image of the MenuItem depending on the state ?
No, currently it is not possible to modify MenuItems.

Best regards.
 

AHilberink

Active Member
Licensed User
Longtime User
Hi Klaus,

Thanks for your reply.

I was seraching for your second answer. So I can't modify MenuItems.

I want to change its image depending on the state.

I will look for other options, like building my own menubar.

Best regards,
André
 
Top