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});*/
}
Use com.intellij.openapi.actionSystem.AnActionEvent#getPresentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With