For Android icons, see here.
Icon file will be created with 24dp, which means 24x24px for drawable-mdpi.
Use 2dp width for lines and radius.
Use white(#ffffff
) with 80% alpha.
Icons are made with .svg files, and build script relies on
some structures or naming conventions.
So if you want to add or edit .svg files, check this section.
Must be svg
.
For Android action bar icons, it should start with ic_action_
.
Icon file has two layers: background
and icon
.
This should be specified to <g>
tag's id
attribute.
Remove style
element of background
's <g>
tag.
background
layer will become invisible by build script.
The build script insert style="display:none"
after id="background"
, so if your icon file has style
attribute on background
's <g>
tag, it will cause errors.
OK:
<g
inkscape:label="background"
inkscape:groupmode="layer"
id="background"
transform="translate(0,-1028.3622)">
NG:
<g
inkscape:label="background"
inkscape:groupmode="layer"
id="background"
style="display:inline"
transform="translate(0,-1028.3622)">
You can check how they look like on Android app.
If you know a little about Android apps and have SDK environment, please try it.
$ ./gradlew installDebug
- Create icon with .svg format. Check guidelines carefully.
- Execute
build.sh
to generate your icons. (See below) - Check if your icons are correctly generated.
- Add your icon to sample Android app. (See below)(optional)
- Check it on Android app. (optional)
- Edit
app
image with GIMP anddrawable-xhdpi
icon. (optional) - Commit your icons.
- Send a pull request!
This project's icons are generated by export_icons.
If you are a Mac OS X user, you can also install it with Homebrew.
$ brew tap ksoichiro/export_icons
$ brew install export_icons
For convenience, all of the latest result images are included in dist
directory.
If you add or edit .svg files, you should execute build.sh
to re-generate images before committing .svg files.
Note that this script is designed for OS X users.
List definition is written on IconList
class on Android app project.
So edit app/src/main/java/com/github/ksoichiro/appicons/IconList
.
public IconList() {
:
add(new Icon(R.drawable.ic_action_awesome, "ic_action_awesome"));
}
After editing java file, please execute the following command to check if the app can be built successfully.
$ ./gradlew installDebug
At first, generate images to a temporary directory:
$ mkdir tmp
$ ./build.sh -a -f src/ic_action_check3.svg
$ for i in $(find dist/*/res/drawable-hdpi/ic_action_check3*); do cp -p $i tmp; done
Then, open color.xcf
with GIMP and import images in tmp
directory as layers.