Google has released a large set of icons in material design for use in your apps.
The newest set of these icons can be downloaded here: https://github.com/google/material-design-icons
The problem with this great archive is that it contains many icons in resolutions and formats you don't need if you just want to create Android Apps. Another bad thing is that they are all packed into very few drawable folders so if you search for just one icon for a dark theme in different resolutions for hdpi, xhdpi etc. it is very confusing to pick just the files you need.
So I started to learn B4J (yes, it's my first B4J project) and hacked down a simple reorganize tool which simply copies the icons you wish to a directory structure which is much more handy to pick a single icon.
Usage:
The program is a Non-GUI application and you can specify the following parameters:
<Source Path> - The path to the original Google icon files. You have to keep the original directory structure intact.
<Destination Path> - The destination path. A new directory structure will be created here.
[<color>] [<color>] ... - A list of color names which should be copied to the new structure. Usually you will only need "black" and "white" icons. If you don't give one or more colors as parameter all colors will be copied.
[<density>] [<density>] ... - A list of density or size values. Google provided all icons in different densities. For ActionBar action icons you will only need 24dip icons so specify just "24" here. If you need the icons in other densities then just specify another density as a parameter. If you ommit the density parameter icons in all densities are copied.
The directory structure created is like this:
<Destination Path>\<color>\<density>\<category>\<icon_name>\drawable-xxx\<icon file name>
So if you want to copy an icon to your project just copy all the drawable-xxx folders of the icon to your res folder of your android app. Seems to be much easier to handle for me.
I created an icon archive with just 24dp icons (for ActionBar/Toolbar) in black and white (light and dark theme). This reduced the number of icons in the archive from 72000 to 7500 and it is much easier to pick all drawables for just a single icon.
Be aware that this tool was "hacked" down in just a few hours. It works well for me but it may miss some error handling.
The newest set of these icons can be downloaded here: https://github.com/google/material-design-icons
The problem with this great archive is that it contains many icons in resolutions and formats you don't need if you just want to create Android Apps. Another bad thing is that they are all packed into very few drawable folders so if you search for just one icon for a dark theme in different resolutions for hdpi, xhdpi etc. it is very confusing to pick just the files you need.
So I started to learn B4J (yes, it's my first B4J project) and hacked down a simple reorganize tool which simply copies the icons you wish to a directory structure which is much more handy to pick a single icon.
Usage:
The program is a Non-GUI application and you can specify the following parameters:
<Source Path> - The path to the original Google icon files. You have to keep the original directory structure intact.
<Destination Path> - The destination path. A new directory structure will be created here.
[<color>] [<color>] ... - A list of color names which should be copied to the new structure. Usually you will only need "black" and "white" icons. If you don't give one or more colors as parameter all colors will be copied.
[<density>] [<density>] ... - A list of density or size values. Google provided all icons in different densities. For ActionBar action icons you will only need 24dip icons so specify just "24" here. If you need the icons in other densities then just specify another density as a parameter. If you ommit the density parameter icons in all densities are copied.
The directory structure created is like this:
<Destination Path>\<color>\<density>\<category>\<icon_name>\drawable-xxx\<icon file name>
So if you want to copy an icon to your project just copy all the drawable-xxx folders of the icon to your res folder of your android app. Seems to be much easier to handle for me.
I created an icon archive with just 24dp icons (for ActionBar/Toolbar) in black and white (light and dark theme). This reduced the number of icons in the archive from 72000 to 7500 and it is much easier to pick all drawables for just a single icon.
Be aware that this tool was "hacked" down in just a few hours. It works well for me but it may miss some error handling.
Attachments
Last edited: