Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

View the Project on GitHub mikepenz/Android-Iconics

Android-Iconics Download


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

Already available fonts

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

String fields for icons

For generating string field for each of icons of your font, you can use this simple generator:

Android-Iconics String Generator

Android module generator

A awesome gradle plugin which can automatically fetch a font from Fontastic, and generate the Android Module for your project.




1. Provide the gradle dependency

//the core iconics library (without any widgets)
implementation "com.mikepenz:iconics-core:4.0.2"
implementation "androidx.appcompat:appcompat:${versions.appCompat}"

1b. (optional) Add the view’s dependency

//this adds all ui view widgets (IconicsButton, IconicsImageView, ...)
implementation "com.mikepenz:iconics-views:4.0.2"

For the non kotlin variant please use a version smaller than 4.x.y (See the releases on GitHub) To use appcompat please use a version smaller than 3.1.0. (See the releases on GitHub)

2. Choose your desired fonts

implementation 'com.mikepenz:google-material-typeface:'
implementation 'com.mikepenz:material-design-iconic-typeface:'
implementation 'com.mikepenz:fontawesome-typeface:'
implementation 'com.mikepenz:octicons-typeface:'
implementation 'com.mikepenz:meteocons-typeface:'
implementation 'com.mikepenz:community-material-typeface:'
implementation 'com.mikepenz:weather-icons-typeface:'
implementation 'com.mikepenz:typeicons-typeface:'
implementation 'com.mikepenz:entypo-typeface:'
implementation 'com.mikepenz:devicon-typeface:'
implementation 'com.mikepenz:foundation-icons-typeface:'
implementation 'com.mikepenz:ionicons-typeface:'
implementation 'com.mikepenz:pixeden-7-stroke-typeface:'
implementation 'com.mikepenz:material-design-icons-dx-typeface:'


Use as drawable


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 here. 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.

Custom Views

As IconicsImageView

    app:iiv_icon="gmd-favorite" />  // or @string/gmd_favorite with our generator

As IconicsTextView


As IconicsButton

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

Automatic XML



Available fonts

|Link|Prefix|Dependency| |—|—|—| |Google Material Design Icons ORIGINAL by Google|gmd|implementation ‘com.mikepenz:google-material-typeface:+.original@aar’| |Material Design Iconic Font Google Material Iconic|gmi|implementation ‘com.mikepenz:material-design-iconic-typeface:+@aar’| |Fontawesome|faw|implementation ‘com.mikepenz:fontawesome-typeface:+@aar’| |Meteocons|met|implementation ‘com.mikepenz:meteocons-typeface:+@aar’| |Octicons|oct|implementation ‘com.mikepenz:octicons-typeface:+@aar’| |Community Material|cmd|implementation ‘com.mikepenz:community-material-typeface:+@aar’| |Weather Icons|wic|implementation ‘com.mikepenz:weather-icons-typeface:+@aar’| |Typeicons|typ|implementation ‘com.mikepenz:typeicons-typeface:+@aar’| |Entypo|ent|implementation ‘com.mikepenz:entypo-typeface:+@aar’| |Devicon|dev|implementation ‘com.mikepenz:devicon-typeface:+@aar’| |Foundation Icons|fou|implementation ‘com.mikepenz:foundation-icons-typeface:+@aar’| |Ionicons|ion|implementation ‘com.mikepenz:ionicons-typeface:+@aar’| |Pixden7Stroke|pe7|implementation ‘com.mikepenz:pixeden-7-stroke-typeface:+@aar’| |Material Design DX|cmf|implementation ‘com.mikepenz:material-design-icons-dx-typeface:+@aar’|

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

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. You can manually provide applicationContext and trigger initialization, or you can use our IconicsContentProvider and do absolutely nothing.

If you want to use tha manual way - place this value into your resources

<bool name="is_iconics_content_provider_enabled">false</bool>

And initialize Iconics as you wish

class CustomApplication : Application() {
    override fun 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)

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.

    .style(ForegroundColorSpan(Color.WHITE), BackgroundColorSpan(Color.BLACK), RelativeSizeSpan(2f))
    .styleFor(FontAwesome.Icon.faw_adjust, 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:

IconicsDrawable(this, "faw-adjust").actionBar()
IconicsDrawable(this, FontAwesome.Icon.faw_adjust).size(24.toIconicsSizeDp()).padding(1.toIconicsSizeDp())

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 ;)

Special Contributor


Developed By


Copyright 2019 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.