Easy to use material icons for Android
Easy to use material icons for Android
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.
android-material-icons allows you to include any of the Material Design 2.2.0 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 :)
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.
You can either use
IconTextView/IconButtonor use anyTextViewand then programmatically callIconify.addIcons(myTextView);.
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());
maybe working)$ANDROID_SDK/platforms/android-$N/data/fonts/ folder for each platform $N available.hacky_preview like this:
Gradle:
repositories {
...
mavenCentral()
...
}
...
dependencies {
...
implementation 'com.malinskiy:materialicons:1.0.3'
...
}
…
No open issues yet, or sync has not completed.