Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
Java Go Other
Latest commit 5476518 Jan 23, 2017 @mikepenz committed on GitHub Merge pull request #245 from Tolriq/icon_exists
Add iconExists method to check icon availability.
Failed to load latest commit information.
DEV * update functiongraphic Jan 26, 2016
app * [release] v2.8.2 Dec 27, 2016
community-material-typeface-library * release v1.7.22.1 of the community material font Nov 17, 2016
devicon-typeface-library removed "_int" from lic-file Jul 6, 2016
entypo-typeface-library removed "_int" from lic-file Jul 6, 2016
fontawesome-typeface-library * remove old fontawesome ttf Oct 27, 2016
foundation-icons-typeface-library * also update file Jul 7, 2016
google-material-typeface-library * update google-material-typeface to v2.2.0.3.original and add string… Aug 3, 2016
gradle/wrapper * update to gradle 2.14.1 Aug 25, 2016
ionicons-typeface-library removed "_int" from lic-file Jul 6, 2016
library-core Add iconExists method to check icon availability. Jan 9, 2017
material-design-iconic-typeface-library * update to com.mikepenz:google-material-typeface: Jul 4, 2016
meteocons-typeface-library * also update file Jul 7, 2016
octicons-typeface-library removed "_int" from lic-file Jul 6, 2016
typeicons-typeface-library removed "_int" from lic-file Jul 6, 2016
weather-icons-typeface-library removed "_int" from lic-file Jul 6, 2016
.gitignore Add drawer Apr 16, 2015
.gradletasknamecache * rename all occurencies of com.mikpenz to com.mikepenz Dec 24, 2014
LICENSE Initial commit Nov 1, 2014 * drop minSdk 10 support. new minSdk is now 14 Aug 18, 2016 * [release] v2.8.2 Dec 27, 2016
build.gradle * update tooling, support libs, dependencies Dec 27, 2016
gradle-jcenter-push.gradle * artifactId was wrong in the jcenter push file Jan 15, 2016
gradle-mvn-push.gradle * move gradle-mvn-push to root Nov 2, 2014 * [release] v2.5.7 Feb 22, 2016
gradlew Bump Community Material Typeface library to v1.1.70 Jul 25, 2015
gradlew.bat * add gradle wrapper Jun 3, 2015
settings.gradle * remove the original from the GoogleMaterial font addon Dec 7, 2015

Android-Iconics Maven Central Android Arsenal


If you are an app developer you will know the problem. You start an app but require many different icons, in different sizes (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi), different colors, and different variants. If you get the icons as vector (.svg) or there are many changes over the time, you will always have to get the correct drawables again.

This consumes a lot of time!

Now there's an easy, fast, and small solution for this! The Android-Iconics library.

This library allows you to include vector icons everywhere in your project. No limits are given. Scale with no limit, use any color at any time, provide a contour, and many additional customizations...

Use the icons in the variation you need them.

What do you get

  • No customization limitations (size, color, contour, background, padding, positioning, ...)
  • One icon source (no more mdpi, hdpi, ...)
  • Flexibility
  • If it takes a Drawable, it will also work with the IconicsDrawable!
  • Save in APK size
  • All licenses included, best used with AboutLibraries

Already available fonts

Need more? Provide additional fonts for you project, or even create your custom font with just the icons you need.



1. Provide the gradle dependency

compile "com.mikepenz:iconics-core:2.8.2@aar"
compile "${supportLibVersion}"

2. Choose your desired fonts

compile 'com.mikepenz:google-material-typeface:' 
compile 'com.mikepenz:material-design-iconic-typeface:'
compile 'com.mikepenz:fontawesome-typeface:'
compile 'com.mikepenz:octicons-typeface:'
compile 'com.mikepenz:meteocons-typeface:'
compile 'com.mikepenz:community-material-typeface:'
compile 'com.mikepenz:weather-icons-typeface:'
compile 'com.mikepenz:typeicons-typeface:'
compile 'com.mikepenz:entypo-typeface:'
compile 'com.mikepenz:devicon-typeface:'
compile 'com.mikepenz:foundation-icons-typeface:'
compile 'com.mikepenz:ionicons-typeface:'

3. Define IconicsLayoutInflater to enable automatic xml icons detection (optional)

Set the IconicsLayoutInflater as new LayoutInflaterFactory. This will enable automatic icon detection for TextViews,Buttons, and allow you to set icons on ImageView's via xml. This is compatible with libs which wrap the baseContext like Calligraphy. This does not work on FAB's please use the Context-Injection instead.

protected void onCreate(Bundle savedInstanceState) {
    LayoutInflaterCompat.setFactory(getLayoutInflater(), new IconicsLayoutInflater(getDelegate()));

3. ALTERNATIVE: Inject into Context (optional)

Wrap the Activity context. This will enable the same features as Step 3.1., but is not compatible with other libs wrapping the baseContext.

protected void attachBaseContext(Context newBase) {


Use as drawable

new IconicsDrawable(this)

Use via XML

If you use the Iconics library via XML provide the icon you want to use in the following syntax: gmd-favorite --> fontId-iconName. A list of the available fonts and their fontId can be found near the end of the All icon names from the default fonts can be found via the DEMO application.

Notation within text

Use the { icon-definer } syntax

Some great text with a {faw-android} font awesome icon and {met-wind} meteocons icons.

As ImageView (only available if you follow Step 3 or inject the context)

    app:ico_size="48dp" />

    //other possible attributes

As TextView (only available if you inject the context)

    android:text="{gmd-chart} Chart"

Custom Views (if you do NOT follow Step 3 or inject the context)

As IconicsImageView

    app:iiv_icon="gmd-favorite" />

As IconicsTextView


As IconicsButton

        android:text="{faw-adjust} Button"

Automatic XML



Available fonts

  • Google Material Design Icons
    • "gmd"
    • ORIGINAL by Google compile 'com.mikepenz:google-material-typeface:+.original@aar'
  • Material Design Iconic Font
    • "gmi"
    • Google Material Iconic compile 'com.mikepenz:material-design-iconic-typeface:+@aar'
  • Fontawesome
    • "faw"
    • compile 'com.mikepenz:fontawesome-typeface:+@aar'
  • Meteocons
    • "met"
    • compile 'com.mikepenz:meteocons-typeface:+@aar'
  • Octicons
    • "oct"
    • compile 'com.mikepenz:octicons-typeface:+@aar'
  • Community Material
    • "cmd"
    • compile 'com.mikepenz:community-material-typeface:+@aar'
  • Weather Icons
    • "wic"
    • compile 'com.mikepenz:weather-icons-typeface:+@aar'
  • Typeicons
    • "typ"
    • compile 'com.mikepenz:typeicons-typeface:+@aar'
  • Entypo
    • "ent"
    • compile 'com.mikepenz:entypo-typeface:+@aar'
  • Devicon
    • "dev"
    • compile 'com.mikepenz:devicon-typeface:+@aar'
  • Foundation Icons
    • "fou"
    • compile 'com.mikepenz:foundation-icons-typeface:+@aar'
  • Ionicons
    • "ion"
    • compile 'com.mikepenz:ionicons-typeface:+@aar'

Licenses for all included fonts are linked inside the class or can be found on the coresponding repoistories.

Advanced Usage

Register fonts

If you want to add your own custom font, or a GenericFont you have to register this font (before using it). The best place to do this is the Application.

public class CustomApplication extends Application {
    public void onCreate() {

        //only required if you add a custom or generic font on your own

        //register custom fonts like this (or also provide a font definition file)
        Iconics.registerFont(new CustomFont());

Advanced IconicsBuilder

Everything is easy and simple. Right? But now you got a single icon within your textview and you need additional styling? Just define the style for all icons or only a specific one. You can find this in the PlaygroundActivity of the sample too.

new Iconics.IconicsBuilder().ctx(this)
                .style(new ForegroundColorSpan(Color.WHITE), new BackgroundColorSpan(Color.BLACK), new RelativeSizeSpan(2f))
                .styleFor(FontAwesome.Icon.faw_adjust, new BackgroundColorSpan(Color.RED))

String icon-key or typeface enum

Sometimes you won't like to use the icon-key ("faw-adjust") like this, but use the enum provided by a specific font. Both is valid:

  new IconicsDrawable(this, "faw-adjust").actionBarSize()
  new IconicsDrawable(this, FontAwesome.Icon.faw_adjust).sizeDp(24)

Create custom fonts

This is possible with only the *.ttf and *.css mapping file. And will take you 2 minutes.

You can get these two files by downloading a web icon font, or if you want to create your own custom icon font from *.svg files then you can use following tools:

After you got those two files, head over to the icon addon creation tool Enter all the information. Add the *.ttf and *.css and click the button. It will generate and download the icon font addon as zip. (this tool is local only, no files are sent to a server, you can safely use it with any icons)


Exclude R from ProGuard to enable the font addon auto detection

-keep class .R
-keep class **.R$* {

All other ProGuard rules are now bundled internally with each font.


You can try the sample application out. It's on Google Play ;)


Developed By


Copyright 2016 Mike Penz

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.