Giter Site home page Giter Site logo

android-material-design-icon-generator-plugin's Introduction

Android Material Design Icon Generator Plugin

This plugin help you to set material design icons to your Android project.

capture

Installation

Manually

  1. Download the MaterialDesignIconGeneratorPlugin.zip

On MAC:

  1. Preference > Plugins > Install plugin from disk... Select MaterialDesignIconGeneratorPlugin.zip above.

On Linux or Windows:

  1. File > Settings... > IDE Settings > Plugins > Install plugin from disk... Select MaterialDesignIconGeneratorPlugin.zip above.

  2. Restart IntelliJ/Android Studio to activate plugin.

Install IntelliJ Plugin Repositories

On MAC:

Go Preference > Plugins > Browse repositories, then search material.

On Linux or Windows:

Go File > Settings... > IDE Settings > Plugins > Browse repositories, then search material.

capture

Development

$ git clone https://github.com/konifar/android-material-design-icon-generator-plugin.git
$ cd android-material-design-icon-generator-plugin
$ git submodule init
$ git submodule foreach git pull origin master
$ python script/copy_icons.py
$ python script/create_template.py

License

Copyright 2014-2015 Yusuke Konishi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-material-design-icon-generator-plugin's People

Contributors

ahornerr avatar dvdandroid avatar jahudzik avatar konifar avatar ktomek avatar martyndavis avatar oldergod avatar ppamorim avatar sho5nn avatar vanniktech avatar yaeda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-material-design-icon-generator-plugin's Issues

How to open this plugin

What is the shortcut for this plugin please I forgot ?
Ctrl ALT M but it's not working on latest android

Fix for Android Studio 4.0

The plugin has not been working for a few versions of android studio.

The context menu item shows up, but on clicking the import icons dialog does not show up. Probably related to API changes in underlying IntelliJ version upgrades.

Would be great to get this awesome plugin working again ๐Ÿ˜

Cannot find resource dir

Hello, I'm using the version 1.2, and now has the same problem.
I see the new UI about Res Directory, is it need to be changed?

Error adding image/ic_lens

The stacktrace :

input == null!
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1348)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.copyFile(MaterialDesignIconGenerateDialog.java:461)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.createIcon(MaterialDesignIconGenerateDialog.java:450)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.create(MaterialDesignIconGenerateDialog.java:417)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.doOKAction(MaterialDesignIconGenerateDialog.java:411)
at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1821)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1787)
at ...

not working:PatternSyntaxException

android studio 1.2 beta windows 7
plugin not working and the error is:
PatternSyntaxException
Unexpected internal error near index 1

^

Automatic Resource Directory Resolution

I think it's possible to resolve the resource directory automatically, instead of the user having to input it manually each time the plugin dialog is opened. There is another material icon generator which uses an ADT template that has that functionality, although it uses FreeMarker template language which I doubt is compatible with this plugin.

See resOut in the following files

https://github.com/jgilfelt/androidicons-adt-template/blob/master/AndroidIcons/globals.xml.ftl#L5

https://github.com/jgilfelt/androidicons-adt-template/blob/master/AndroidIcons/recipe.xml.ftl#L6

I also noticed the following lines in my module .iml file:

<module external.root.project.path="$MODULE_DIR$/..">
  <component name="FacetManager">
    <facet type="android" name="Android">
      <configuration>
        <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />

//And later on...

<component name="NewModuleRootManager" inherit-compiler-output="false">
  <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
  <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
  <exclude-output />
  <content url="file://$MODULE_DIR$">
    <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />

https://github.com/winterDroid/android-drawable-importer-intellij-plugin/blob/master/src/de/mprengemann/intellij/plugin/androidicons/util/AndroidFacetUtils.java

https://github.com/pbreault/adb-idea/blob/master/src/com/developerphil/adbidea/adb/AdbFacade.java

Padding

Hi

Each icon is generated with some padding inside of it.

Can it be removed so the icon fills the image borders?

Thanks

Latest Android Studio 1.3 won't work

The event log is:

PluginException: cannot create class "org.pandawarrior.intellij.plugin.MaterialGenerateAction" [Plugin: com.pandawarrior.materialColorGenerator]
Throwable: Null child action in group New () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=Material
Throwable: Null child action in group New () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=Material

AndroidStudio 1.2.1.1 windowns10: java.lang.NullPointerException

AndroidStudio 1.2.1.1 windowns10: java.lang.NullPointerException
java.lang.NullPointerException at java.io.FileInputStream.<init>(FileInputStream.java:124) at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:337) at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.initIconComboBox(MaterialDesignIconGenerateDialog.java:382) at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.<init>(MaterialDesignIconGenerateDialog.java:100) at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532) at java.awt.Component.processMouseEvent(Component.java:6527) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6292) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4883) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4705) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4705) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:734) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

plugin not starting getting null pointer exception

null
java.lang.NullPointerException
at java.io.FileInputStream.(FileInputStream.java:138)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:340)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.initIconComboBox(MaterialDesignIconGenerateDialog.java:271)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.(MaterialDesignIconGenerateDialog.java:86)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Default settings?

Have configurable default settings or set the default to 24dp and white with all DPI's checked.

Custom size for icons

Is it possible to have an option of custom size too ?

Something like we specify 72dp, and it generates 72dp icons for all mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi.

I looked up the material design icon's repo, and found that google provides an svg for each icon, may be that can be used.

Issues with Icon

Specifically the action/ic_reorder icon has defects. Some of the icons show up as a block instead of the actual icon (36dp xxxhdpi and xhdpi for example, several others have this issue as well).

NoSuchMethodError: 'java.util.List org.jetbrains.android.facet.AndroidFacet.getAllResourceDirectories()'

ava.lang.NoSuchMethodError: 'java.util.List org.jetbrains.android.facet.AndroidFacet.getAllResourceDirectories()'
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.initResDirectoryName(MaterialDesignIconGenerateDialog.java:318)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.(MaterialDesignIconGenerateDialog.java:126)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:573)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:706)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:260)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:702)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:584)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:467)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:456)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:224)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Is this plugin still supported?

Is this plugin still supported? I ask this, becuase there are some issues with AndroidStudio 3.6+ and this plugin and there are no answers from the developer...

Download link in the README.md could not be found

Seems, the link provided in the README.md is broken.
LINK > [https://github.com/konifar/android-material-design-icon-generator-plugin/raw/master/MaterialDesignIconGeneratorPlugin.jar]
Could you please update it.

PatternSyntaxException

I tried just today to run the plugin in Intellij Community edition.
Installs nice, but after selecting add new material design icon from context it crashes with the following error:
My version of intellij community: 14.0.3

Unexpected internal error near index 1
\
 ^
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
    at java.util.regex.Pattern.error(Pattern.java:1955)
    at java.util.regex.Pattern.compile(Pattern.java:1702)
    at java.util.regex.Pattern.<init>(Pattern.java:1351)
    at java.util.regex.Pattern.compile(Pattern.java:1028)
    at java.lang.String.split(String.java:2367)
    at java.lang.String.split(String.java:2409)
    at com.konifar.material_icon_generator.IconModel.setIconAndFileName(IconModel.java:124)
    at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.<init>(MaterialDesignIconGenerateDialog.java:97)
    at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
    at java.awt.Component.processMouseEvent(Component.java:6525)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2739)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:719)
    at java.awt.EventQueue$4.run(EventQueue.java:717)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Color issue with generating in 24dp and 48dp

Some icons with dimen 24dp and 48dp have an issue. The image is total filled with color in resolutions bigger than hdpi.

I didn't try with all icons. But the icon wich I need have the problem: ic_add with white color, but the same problem occurs with any color. See images attached.

material icon generator_001
material icon generator_002

NullPointerException

I am having null pointer exception while clicking on "Material Design icon" in "New in Current Directory". Here is the details.

java.lang.NullPointerException
at java.io.FileInputStream.(FileInputStream.java:138)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:340)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.initIconComboBox(MaterialDesignIconGenerateDialog.java:271)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.(MaterialDesignIconGenerateDialog.java:86)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:733)
at com.intellij.ui.popup.AbstractPopup$18.run(AbstractPopup.java:1248)
at com.intellij.openapi.wm.impl.FocusManagerImpl.flushRequest(FocusManagerImpl.java:651)
at com.intellij.openapi.wm.impl.FocusManagerImpl.flushNow(FocusManagerImpl.java:632)
at com.intellij.openapi.wm.impl.FocusManagerImpl.flushIdleRequests(FocusManagerImpl.java:602)
at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:60)
at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:108)
at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Include other icons

Hey just a quick suggestion.
There's a repository that includes the google material icons but also has icons created by other artists. Seeing that google rarely adds new icons would you be willing to include these as well? It would help the community out a lot as it's updated constantly and also the artists who created those icons would benefit as well.

New Icons

There are a lot of new icons available on Google's material icon website. Possibly update?

UI improvment request

Instead of a long dropdown list, it would be really nice if the icons were displayed in a grid list with a search bar at the top. Clicking an icon would select it and allow adding multiple icons at once.

The ability for a user preference to set their own default color, size, and dpi variants would be really great.

Another great feature would be to detect the icons already used, set them as checked. If an icon is unchecked it should remove that icon from the drawable folders.

Thanks again for this great plugin!

Issues with Icons

Specifically the action/ic_reorder icon has defects. Some of the icons show up as a block instead of the actual icon (36dp xxxhdpi and xhdpi for example, several others have this issue as well).

Error

when i try to click on Material Design Icon this error appears:

Unexpected internal error near index 1

^: Unexpected internal error near index 1

^
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1

^
at java.util.regex.Pattern.error(Pattern.java:1955)
at java.util.regex.Pattern.compile(Pattern.java:1702)
at java.util.regex.Pattern.(Pattern.java:1351)
at java.util.regex.Pattern.compile(Pattern.java:1028)
at java.lang.String.split(String.java:2367)
at java.lang.String.split(String.java:2409)
at com.konifar.material_icon_generator.IconModel.setIconAndFileName(IconModel.java:124)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.(MaterialDesignIconGenerateDialog.java:97)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:266)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:926)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:236)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:105)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:512)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:44)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:532)
at java.awt.Component.processMouseEvent(Component.java:6527)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6292)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4883)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4705)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4705)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Exception in plugin Android Material Design Icon Generator(1.9). Plugin Andorid Studio 3.6

Problem

getAllResourceDirectories() is deprecated

StackTrace:

java.lang.NoSuchMethodError: org.jetbrains.android.facet.AndroidFacet.getAllResourceDirectories()Ljava/util/List;

at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.initResDirectoryName(MaterialDesignIconGenerateDialog.java:318)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateDialog.<init>(MaterialDesignIconGenerateDialog.java:126)
at com.konifar.material_icon_generator.MaterialDesignIconGenerateAction.actionPerformed(MaterialDesignIconGenerateAction.java:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:265)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:106)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:115)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
at java.awt.Component.processMouseEvent(Component.java:6550)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:823)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

This is the environment:

Android Studio 3.6
Build #AI-192.7142.36.36.6200805, built on February 12, 2020
Runtime version: 1.8.0_212-release-1586-b04 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 6
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: com.konifar.material_icon_generator

Possible Solution???:

private void initResDirectoryName() {
resDirectoryName.setText(project.getBasePath() + DEFAULT_RES_DIR);
List facets = AndroidUtils.getApplicationFacets(project);
// This code needs refined to support multiple facets and multiple resource directories
if (facets.size() >= 1) {
//List allResourceDirectories = facets.get(0).getAllResourceDirectories();
List allResourceDirectories = ResourceFolderManager.getInstance(currentFacet).getFolders();

Add night qualifier support

Could be a simple checkbox and then it'd move the icons to:

  • drawable-night-ldpi
  • drawable-night-mdpi
  • drawable-night-xhdpi
  • drawable-night-xxhdpi
  • drawable-night-xxxhdpi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.