Easy to use material icons for Android

Overview

Maven Central Android Arsenal

All available icons (744)

If, like me, you're tired of copying 5 images (ldpi, mdpi, hdpi, xhdpi, xxhdpi) for each icon you want to use in your app, for each color you want to use them with android-material-icons can help you.


About

android-material-icons allows you to include any of the Material Design 2.1.1 icons by Google packed by Sergey Kupletsky in your texts, your ActionBar, and even in your EditTexts. Icons are infinitely scalable, and customizable with shadows and everything you can do on texts.

Special thanks to Joan Zapata for his android-iconify project since this is mostly a copy :)

Get started #1

If you need icons on a TextView, use the { } syntax. You can put any text around it and have more than one icon in the text. Note that the shadows apply to the icons as well.

<IconTextView
    android:text="{zmdi-android}"
    android:shadowColor="#22000000"
    android:shadowDx="3"
    android:shadowDy="3"
    android:shadowRadius="1"
    android:textSize="90dp"
    android:textColor="#FF33B5E5"
    ... />

You can either use IconTextView / ButtonTextView or use any TextView and then programmatically call Iconify.addIcons(myTextView);.

Get started #2

If you need an icon in an ImageView or in your ActionBar, then you should use IconDrawable. Again, icons are infinitely scalable and will never get fuzzy!

// Set an icon in the ActionBar
menu.findItem(R.id.share).setIcon(
   new IconDrawable(this, IconValue.zmdi_share)
   .colorRes(R.color.ab_icon)
   .actionBarSize());

Design-time preview (maybe working)

  1. Copy material font file (do not rename it) to your $ANDROID_SDK/platforms/android-$N/data/fonts/ folder for each platform $N available.
  2. Assign attribute hacky_preview like this:
<com.malinskiy.materialicons.widget.IconTextView
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="{zmdi-android}"
            android:textSize="48dp"
            app:hacky_preview="true"/>

Get it

Gradle:

repositories {
    ...
    mavenCentral()
    ...
}
...
dependencies {
    ...
    compile 'com.malinskiy:materialicons:1.0.2'
    ...
}

License

Copyright 2013 Joan Zapata
Copyright 2014 Anton Malinskiy

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.

It uses Google's material font licensed under OFL 1.1, which is compatible
with this library's license.

    http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=OFL_plaintext&filename=OFL.txt
    
You might also like...
📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.
📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.

Material NavigationView for Android 📱 📱 Android Library to implement Rich, Beautiful Material Navigation View for your project with Material Design

Compose icons is a pack of libraries that provide well known Icon Packs to use in Jetpack Compose Multiplatform.
Compose icons is a pack of libraries that provide well known Icon Packs to use in Jetpack Compose Multiplatform.

Compose icons is a pack of libraries that provide well known Icon Packs to use in Jetpack Compose Multiplatform. The library usage is inspired by Compose Material Icons.

Animations for Android L drawer, back, dismiss and check icons
Animations for Android L drawer, back, dismiss and check icons

Material Menu Morphing Android menu, back, dismiss and check buttons Have full control of the animation: Including in your project compile 'com.balysv

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

How to improve the user experience using animated icons with vector drawables on Android
How to improve the user experience using animated icons with vector drawables on Android

Android Animated Icons How to improve the user experience using animated icons with vector drawables on Android English version https://medium.com/@an

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

Icons, Borders, Radius ... for Android buttons
Icons, Borders, Radius ... for Android buttons

⚠️ This library was made years ago when it wasn't that easy to customize Android buttons like today. I highly recommend you to use Material Design but

Forecast / DarkSky's Skycons, Animated Weather icons recreated for Android
Forecast / DarkSky's Skycons, Animated Weather icons recreated for Android

Skycons for Android We set out to create a native weather app on Xamarin but we wanted to build something unique to differentiate ourselves amongst th

Animations for Android L drawer, back, dismiss and check icons
Animations for Android L drawer, back, dismiss and check icons

Material Menu Morphing Android menu, back, dismiss and check buttons Have full control of the animation: Including in your project compile 'com.balysv

IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.
IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.

IconicDroid IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts. Try out the sample application on the Googl

An android library to display FontAwesome Icons in any View or a MenuItem

DroidAwesome A library to display FontAwesome Icons in any View or a MenuItem Views Supported: TextView AutoComplete TextView EditText Switch CheckBox

Icons, Borders, Radius ... for Android buttons
Icons, Borders, Radius ... for Android buttons

⚠️ This library was made years ago when it wasn't that easy to customize Android buttons like today. I highly recommend you to use Material Design but

Svg-to-compose-intellij - A simple Android Studio plugin to generate Jetpack Compose ImageVector icons

svg-to-compose-intellij A simple Android Studio plugin to generate Jetpack Compo

ToggleIconView is a collection library of animated two-stage toggle icons for Android.
ToggleIconView is a collection library of animated two-stage toggle icons for Android.

ToggleIconView ToggleIconView is a collection library of animated two-stage toggle icons for Android. Installation JitPack repository // Project level

Androidicons is a professional, handcrafted icon set with 250 icons in 14 different colors and 5 sizes, including an icon font and all sources.

Android Developer Icons Android Developer Icons is a custom icon set, created by Opoloo. Included are: 250 hand-crafted, pixel-perfect icons in 5 size

Library for Sliding Tab With Color Icons!

Sliding Tab With Color Icons Sliding Tab With Color Icons! Kindly use the following links to use this library: In build.gradle (Project) allprojects {

Optimize notification icons for ColorOS and adapt to native notification icon specifications
Optimize notification icons for ColorOS and adapt to native notification icon specifications

Optimize notification icons for ColorOS and adapt to native notification icon specifications

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

MaterialDrawer ... the flexible, easy to use, all in one drawer library for your Android project. What's included 🚀 • Setup 🛠️ • Migration Guide 🧬

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.

MaterialDrawer ... the flexible, easy to use, all in one drawer library for your Android project. What's included 🚀 • Setup 🛠️ • Migration Guide 🧬

Comments
  • TTF font does not get copied properly

    TTF font does not get copied properly

    Hello,

    I'm using a standard blank application with IntelliJ/Android Studio and when building and launching an activity with an icon it crashes:

    03-11 11:50:27.390    2713-2713/com.x.geekquote.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
        Process: com.x.geekquote.app, PID: 2713
        java.lang.RuntimeException: Font not found /data/data/com.x.geekquote.app/files/icon_tmp/material-design-iconic-font-1.0.1.ttf
                at android.graphics.Typeface.createFromFile(Typeface.java:217)
                at android.graphics.Typeface.createFromFile(Typeface.java:200)
                at com.malinskiy.materialicons.Iconify.getTypeface(Iconify.java:67)
                at com.malinskiy.materialicons.IconDrawable.<init>(IconDrawable.java:46)
                at com.x.geekquote.app.activities.QuoteActivity.onCreateOptionsMenu(QuoteActivity.java:53)
    

    Looking in adb the file mentioned, looks like the file was created but not properly copied:

    root@generic_x86_64:/data/data/com.x.geekquote.app/files/icon_tmp #
    ls -la
    -rw-rw-rw- u0_a53   u0_a53          0 2015-03-11 11:49 material-design-iconic-font-1.0.1.ttf
    

    I solved this by manually adb push the file and the app did not crash anymore but that doesn't really solve it.

    Let me know if you need more details !

    Thanks

    opened by adrien-f 2
  • Little fix for README.md

    Little fix for README.md

    Wrong name: it's "IconButton" not "ButtonTextView" Deprecated: it's "implementation" not "compile" anymore for Gradle

    opened by Tom60chat 1
  • StrictMode warnings

    StrictMode warnings

    D/StrictMode: StrictMode policy violation; ~duration=198 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65567 violation=2
       at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1263)
       at libcore.io.BlockGuardOs.access(BlockGuardOs.java:67)
       at java.io.File.doAccess(File.java:281)
       at java.io.File.exists(File.java:361)
       at android.app.ContextImpl.createFilesDirLocked(ContextImpl.java:418)
       at android.app.ContextImpl.getFilesDir(ContextImpl.java:441)
       at android.content.ContextWrapper.getFilesDir(ContextWrapper.java:203)
       at com.malinskiy.materialicons.Utils.resourceToFile(Utils.java:36)
       at com.malinskiy.materialicons.Iconify.getTypeface(Iconify.java:66)
       at com.malinskiy.materialicons.IconDrawable.<init>(IconDrawable.java:46)
       at com.company.app.activity.Start.onCreate(Start.java:41)
       at com.company.app.activity.Start_.onCreate(Start_.java:35)
       at android.app.Activity.performCreate(Activity.java:6251)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
       at android.app.ActivityThread.-wrap11(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5417)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    
    opened by ened 0
  • NPE in Utils

    NPE in Utils

    Just received a crash report on Android 4.1.2:

    Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.app/com.company.app.activity.HomeActivity_}: android.view.InflateException: Binary XML file line #71: Error inflating class com.malinskiy.materialicons.widget.IconButton
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2067)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
           at android.app.ActivityThread.access$600(ActivityThread.java:133)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4794)
           at java.lang.reflect.Method.invokeNative(Method.java)
           at java.lang.reflect.Method.invoke(Method.java:511)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
           at dalvik.system.NativeStart.main(NativeStart.java)
    Caused by android.view.InflateException: Binary XML file line #71: Error inflating class com.malinskiy.materialicons.widget.IconButton
           at android.view.LayoutInflater.createView(LayoutInflater.java:613)
           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
           at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
           at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136)
           at com.company.app.activity.HomeActivity_.setContentView(HomeActivity_.java:51)
           at com.company.app.activity.HomeActivity_.onCreate(HomeActivity_.java:42)
           at android.app.Activity.performCreate(Activity.java:5008)
           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
           at android.app.ActivityThread.access$600(ActivityThread.java:133)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4794)
           at java.lang.reflect.Method.invokeNative(Method.java)
           at java.lang.reflect.Method.invoke(Method.java:511)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
           at dalvik.system.NativeStart.main(NativeStart.java)
    Caused by java.lang.reflect.InvocationTargetException
           at java.lang.reflect.Constructor.constructNative(Constructor.java)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
           at android.view.LayoutInflater.createView(LayoutInflater.java:587)
           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
           at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
           at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136)
           at com.company.app.activity.HomeActivity_.setContentView(HomeActivity_.java:51)
           at com.company.app.activity.HomeActivity_.onCreate(HomeActivity_.java:42)
           at android.app.Activity.performCreate(Activity.java:5008)
           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
           at android.app.ActivityThread.access$600(ActivityThread.java:133)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4794)
           at java.lang.reflect.Method.invokeNative(Method.java)
           at java.lang.reflect.Method.invoke(Method.java:511)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
           at dalvik.system.NativeStart.main(NativeStart.java)
    Caused by java.lang.NullPointerException
           at com.malinskiy.materialicons.Utils.resourceToFile(Utils.java:52)
           at com.malinskiy.materialicons.Iconify.getTypeface(Iconify.java:66)
           at com.malinskiy.materialicons.Iconify.addIcons(Iconify.java:32)
           at com.malinskiy.materialicons.widget.IconButton.init(IconButton.java:38)
           at com.malinskiy.materialicons.widget.IconButton.<init>(IconButton.java:20)
           at java.lang.reflect.Constructor.constructNative(Constructor.java)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
           at android.view.LayoutInflater.createView(LayoutInflater.java:587)
           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
           at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
           at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
           at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
           at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136)
           at com.company.app.activity.HomeActivity_.setContentView(HomeActivity_.java:51)
           at com.company.app.activity.HomeActivity_.onCreate(HomeActivity_.java:42)
           at android.app.Activity.performCreate(Activity.java:5008)
           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
           at android.app.ActivityThread.access$600(ActivityThread.java:133)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4794)
           at java.lang.reflect.Method.invokeNative(Method.java)
           at java.lang.reflect.Method.invoke(Method.java:511)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
           at dalvik.system.NativeStart.main(NativeStart.java)
    

    Seemed to happen on a device called pap5300duo.

    Utils#resourceToFile should probably check getResourceAsStreams result.

    opened by ened 2
Owner
Anton Malinskiy
Anton Malinskiy
Compose icons is a pack of libraries that provide well known Icon Packs to use in Jetpack Compose Multiplatform.

Compose icons is a pack of libraries that provide well known Icon Packs to use in Jetpack Compose Multiplatform. The library usage is inspired by Compose Material Icons.

Gabriel Souza 280 Dec 29, 2022
Forecast / DarkSky's Skycons, Animated Weather icons recreated for Android

Skycons for Android We set out to create a native weather app on Xamarin but we wanted to build something unique to differentiate ourselves amongst th

Torry Harris 200 Nov 14, 2022
Androidicons is a professional, handcrafted icon set with 250 icons in 14 different colors and 5 sizes, including an icon font and all sources.

Android Developer Icons Android Developer Icons is a custom icon set, created by Opoloo. Included are: 250 hand-crafted, pixel-perfect icons in 5 size

Opoloo 685 Nov 23, 2022
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

Android-Iconics ... allows to include any icon font with all its vector icons in your project. No limits. Scale with no limit, use any color at any ti

Mike Penz 5k Jan 5, 2023
About-icons - Android library to easily give credit if using icons which require attribution

Android About Icons Library About this project Features How to use Planned improvements Screenshots Contribute Apps using this library License About t

Niko Diamadis 4 Nov 6, 2022
Easy to use material icons for Android

All available icons (744) If, like me, you're tired of copying 5 images (ldpi, mdpi, hdpi, xhdpi, xxhdpi) for each icon you want to use in your app, f

Anton Malinskiy 388 Oct 26, 2022
Android icons with looooong material shadows!

Android Material Shadow Generator Android icons with that loooong material shadow for everyone! FAQ Invalid custom SVG file Here are some common cause

Philipp Eichhorn 735 Dec 8, 2022
Material Design icons by Google

Material design icons Material design icons is the official icon set from Google. The icons are designed under the material design guidelines. 4.0.0 U

Google 47.1k Jan 9, 2023
Library containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.

Material Icon Library A library containing over 2000 material vector icons that can be easily used as Drawable, a standalone View or inside menu resou

null 2.3k Dec 16, 2022
A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design

Metaball-Menu A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design ScreenShot Us

AbYsMeL 198 Sep 15, 2022