Reputation: 5227
I am developing a plugin for Android Studio (Intellij Idea). I want to change the icon when an action is being performed.
But its not changing the icon.
Here is the code -
public void actionPerformed(AnActionEvent event) {
Project project = event.getData(PlatformDataKeys.PROJECT);
ActionManager actionManager = event.getActionManager();
AnAction anAction = actionManager.getAction("York.toggle");
Presentation presentation = anAction.getTemplatePresentation();
presentation.setIcon(IconLoader.getIcon("/icons/ic_fav_search_24dp.png"));
/*String adbPath = getAdpPathOnMachine(project);
BroadcastHelper.main(new String[]{adbPath});*/
}
Upvotes: 4
Views: 347