I just created a custom widget which doesn't have panel, UI and I just want to execute when i hit a onscreen widget icon.. Similar to location widget but I want to use in the off-panel/in-panel widgets..
When I click the icon, it is in selected mode, how to deactivate icon using code..
Can you provide more details on your question? Are you talking about using the Toggle Layer button widget now or are you still asking about your original question deactivating a widget?