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

Overview

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 time, provide a contour, and many additional customizations...


What's included 🚀 Setup 🛠️ Migration Guide 🧬 WIKI / FAQ 📖 Custom Font 🖍️ Sample App


What's included 🚀

  • No customization limitations (size, color, contour, background, padding, positioning, ...)
  • Shadow support
  • Use as XML Drawable starting API 24
  • One icon source (no more mdpi, hdpi, ...)
  • Flexibility
    • Size
    • Colors
    • Contour
    • Shadow
    • Auto mirroring for RTL (opt-in)
  • If it takes a Drawable, it will also work with the IconicsDrawable!
  • Save in APK size
  • [EXPERIMENTAL] Compose support

Already available fonts

Setup

Latest releases 🛠

1. Provide the gradle dependency

dependencies {
    //the core iconics library (without any widgets)
    implementation "com.mikepenz:iconics-core:${latestAndroidIconicsRelease}"
    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:${latestAndroidIconicsRelease}"

2. Choose your desired fonts

Note: Fonts ending with -kotlin require at least v4.x of Android-Iconics Note: v5.1.x or newer requires the latest font versions

implementation 'com.mikepenz:google-material-typeface:4.0.0.1-kotlin@aar'
implementation 'com.mikepenz:google-material-typeface-{outlined|rounded|sharp}:4.0.0.1-kotlin@aar'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.8-kotlin@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.2-kotlin@aar'
implementation 'com.mikepenz:octicons-typeface:11.1.0.0-kotlin@aar'
implementation 'com.mikepenz:meteocons-typeface:1.1.0.7-kotlin@aar'
implementation 'com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar' // note 5.3.45.1 alphabetically sorts, and merges in 3 sections
implementation 'com.mikepenz:weather-icons-typeface:2.0.10.7-kotlin@aar'
implementation 'com.mikepenz:typeicons-typeface:2.0.7.7-kotlin@aar'
implementation 'com.mikepenz:entypo-typeface:1.0.0.7-kotlin@aar'
implementation 'com.mikepenz:devicon-typeface:2.0.0.7-kotlin@aar'
implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.7-kotlin@aar'
implementation 'com.mikepenz:ionicons-typeface:2.0.1.7-kotlin@aar'
implementation 'com.mikepenz:pixeden-7-stroke-typeface:1.2.0.5-kotlin@aar'
implementation 'com.mikepenz:material-design-icons-dx-typeface:5.0.1.2-kotlin@aar'
implementation 'com.mikepenz:phosphor-typeface:1.0.0.0-kotlinn@aar'

Usage

Use as drawable

IconicsDrawable(this, FontAwesome.Icon.faw_android).apply {
    colorInt = Color.RED
    sizeDp = 24
}

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.

Drawable XML (API 24+)

Specify the drawable in your drawable folder.

<com.mikepenz.iconics.IconicsDrawable
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:ico_icon="gmd_favorite"
    app:ico_color="#0000FF"
    app:ico_contour_width="1dp"
    app:ico_contour_color="#00FFFF"
    app:ico_size="24dp" />
    // all custom theming attributes supported

Use like any normal drawable in your application. This feature was suggested and initially provided by @dzamlo

Custom Views

As IconicsImageView

<com.mikepenz.iconics.view.IconicsImageView
    android:layout_width="72dp"
    android:layout_height="72dp"
    app:iiv_color="@android:color/holo_red_dark"
    app:iiv_icon="gmd-favorite" />  // or @string/gmd_favorite with our generator
    //app:iiv_size="12dp"
    //app:iiv_padding="2dp"
    //app:iiv_contour_color="#FF0000"
    //app:iiv_contour_width="2dp"
    //app:iiv_background_color="#FFFF00"
    //app:iiv_corner_radius="2dp"
    //app:iiv_background_contour_color="#FF0000"
    //app:iiv_background_contour_width="1dp"
    //app:iiv_shadow_radius="4dp"
    //app:iiv_shadow_dx="1dp"
    //app:iiv_shadow_dy="1dp"
    //app:iiv_animations="spin|blink_alpha|blink_scale"

As IconicsTextView

<com.mikepenz.iconics.view.IconicsTextView
        android:text="abc{hif-test}defgh{faw-adjust}ijk{fon-test1}lmnopqrstuv{fon-test2}wxyz"
        android:textColor="@android:color/black"
        android:layout_width="wrap_content"
        android:layout_height="56dp"
        android:textSize="16sp"/>

As IconicsButton

<com.mikepenz.iconics.view.IconicsButton
        android:text="{faw-adjust} Button"
        android:layout_width="120dp"
        android:layout_height="60dp"/>

Compose

To include the experimental compose support in your project add the following dependency to your project (since v5.2.0)

implementation "com.mikepenz:iconics-compose:${latestAndroidIconicsRelease}"

Use the provided Image wrapper and set the icon.

Image(
    GoogleMaterial.Icon.gmd_access_alarm,
    colorFilter = ColorFilter.tint(MaterialTheme.colors.primary),
)

Screenshots

Image

Available fonts

Link Prefix Dependency
Google Material Design Icons ORIGINAL by Google gmd,gmo,gmr,gms implementation 'com.mikepenz:google-material-typeface{-outlined,rounded,sharp}:+@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'
Phosphor Icons pho implementation 'com.mikepenz:phosphor-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.

And initialize Iconics as you wish

class CustomApplication : Application() {
    override fun onCreate() {
        super.onCreate()

        //register custom fonts like this (or also provide a font definition file)
        Iconics.registerFont(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.

Iconics.Builder()
    .style(ForegroundColorSpan(Color.WHITE), BackgroundColorSpan(Color.BLACK), RelativeSizeSpan(2f))
    .styleFor(FontAwesome.Icon.faw_adjust, BackgroundColorSpan(Color.RED))
                .on(tv1)
    .build()

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).apply {
    sizeDp = 24
    paddingDp = 1
}

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 android-iconics.mikepenz.com. 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)

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. Iconics-Font-Generator

ProGuard

ProGuard / R8 rules are bundled internally with each font.

Special Contributor

  • Baptiste Lagache Thanks for the gradle font module generator
  • Also thanks for all the other contributors.

Credits

Developed By

License

Copyright 2021 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

   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.
Comments
  • gmd images aren't showing good on certain devices (with custom roms and theme engine)

    gmd images aren't showing good on certain devices (with custom roms and theme engine)

    I've been using Android Iconics for a long time in my apps. When I saw my app at my friend's phone I noticed that the images using google-material-typeface wasn't showing properly (both IconicsTextView and IconicsImageView).

    You can see the result on my device and my friend's device. It's so so strange, it only happens with google-material-typeface, I'm also using community-material-typeface but they look OK on both devices.

    OnePlus device with Euphoria 5.1.1: img_2015-10-19 20 15 55

    Nexus 4 device with CM12.1 (my device): img_2015-10-19 20 15 59

    bug question 
    opened by javiersantos 54
  • IconicsImageView is not displaying icons when added in XML

    IconicsImageView is not displaying icons when added in XML

    Hi, thanks for this very useful library!

    I'm having an issue with IconicsImageView. When I use it in XML, icon and color is not displayed in the app.

    My XML:

    <com.mikepenz.iconics.view.IconicsImageView
        android:id="@+id/icon"
        android:layout_width="20dp"
        android:layout_height="20dp"
        app:iiv_color="@android:color/white"
        app:iiv_icon="faw-plus"
        android:layout_marginRight="10dp"/>
    

    However when I add icon to this view by code it works:

    @Bind(R.id.icon) IconicsImageView mIcon;
    mIcon.setIcon("faw-plus");
    

    Other views IconicsTextView and IconicsButton work without any problems.

    My gradle file:

    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    minSdkVersion 15
    targetSdkVersion 22
    
    compile 'com.mikepenz:iconics-core:1.7.4@aar'
    
    question 
    opened by rafenden 34
  • Execution failed for task ':app:mergeExtDexDebug'.

    Execution failed for task ':app:mergeExtDexDebug'.

    Getting this error while building.

    Execution failed for task ':app:mergeExtDexDebug'.

    Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform artifact 'iconics-core.aar (com.mikepenz:iconics-core:3.2.5)' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=21} > Execution failed for DexingTransform: /Users/apple/.gradle/caches/transforms-2/files-2.1/d5a9e46b08fc3a87a4eb4c070e854658/jars/classes.jar. > Error while dexing.

    question 
    opened by ibrahimbroachwala 25
  • Could not find com.mikepenz:library-typeface-api:unspecified

    Could not find com.mikepenz:library-typeface-api:unspecified

    About this issue

    Hello! Seems like 5.2.2 release is introducing some issues with dependency resolution:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:dataBindingMergeDependencyArtifactsProductionDebug'.
    > Could not resolve all files for configuration ':app:productionDebugCompileClasspath'.
       > Could not find com.mikepenz:library-typeface-api:unspecified.
         Required by:
             project :app > com.mikepenz:iconics-core:5.2.2
    

    Repos:

        repositories {
            google()
            jcenter()
            maven { url "https://jitpack.io" }
            maven { url "https://dl.bintray.com/kotlin/kotlinx/" }
            maven { url "https://dl.bintray.com/kotlin/kotlin-eap/" }
        }
    

    Deps:

        implementation "com.mikepenz:iconics-core:5.2.2"
        implementation "com.mikepenz:iconics-views:5.2.2"
        implementation "com.mikepenz:material-design-icons-dx-typeface:5.0.1.2-kotlin@aar"
        implementation "com.mikepenz:fontawesome-typeface:5.9.0.2-kotlin@aar"
        implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
    

    Details

    • Used library version: 5.2.2
    • Used gradle build tools version: 4.1.1
    • Used tooling / Android Studio version: 4.1.1
    bug 
    opened by dummyco 24
  • No applicable method to...?

    No applicable method to...?

    I'm trying to use an Iconics icon with MaterialDrawer, with this code:

    PrimaryDrawerItem timerSection = new PrimaryDrawerItem().withName("Timer").withIdentifier(TIMER_SECTION).withIcon(CommunityMaterial.Icon.cmd_timer).withTintSelectedIcon(true).withSelectedIconColorRes(R.color.colorOrange).withSelectedTextColorRes(R.color.colorOrange);
    

    But I'm getting the error:

    No applicable method to '(com.mikepenz.community_material_typeface_library.Community.Icon)'
    

    I'm importing the correct classes, and I've included Iconics and the Community Material libraries in my build.gradle. What am I missing? :(

    question 
    opened by drinfernoo 22
  • Iconics 3.2.5 crash on Android 10

    Iconics 3.2.5 crash on Android 10

    About this issue

    Details

    • [ 3.2.5 ] Used library version
    • [ androidx.appcompat:appcompat:1.1.0 ] Used support library version
    • [ 3.5.0 ] Used gradle build tools version
    • [ 29.0.2 / 3.5] Used tooling / Android Studio version
    • [ ] Other used libraries, potential conflicting libraries

    Checklist

    Stacktrace

    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: appnamexxx, PID: 9808
        java.lang.RuntimeException: Unable to start activity ComponentInfo{appnamexxx/appnamexxx.activity.MainActivity}: android.view.InflateException: Binary XML file line #17 in appnamexxx:layout/abc_screen_simple: Binary XML file line #17 in appnamexxx:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
            at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
            at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
            at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
            at android.os.Handler.dispatchMessage(Handler.java:107)
            at android.os.Looper.loop(Looper.java:214)
            at android.app.ActivityThread.main(ActivityThread.java:7356)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
         Caused by: android.view.InflateException: Binary XML file line #17 in appnamexxx:layout/abc_screen_simple: Binary XML file line #17 in appnamexxx:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
         Caused by: android.view.InflateException: Binary XML file line #17 in appnamexxx:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
         Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference
            at com.mikepenz.iconics.context.ReflectionUtils.getValue(ReflectionUtils.java:29)
            at com.mikepenz.iconics.context.InternalLayoutInflater.createCustomViewInternal(InternalLayoutInflater.java:155)
            at com.mikepenz.iconics.context.InternalLayoutInflater.access$000(InternalLayoutInflater.java:20)
            at com.mikepenz.iconics.context.InternalLayoutInflater$PrivateWrapperFactory2.onCreateView(InternalLayoutInflater.java:246)
            at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:239)
            at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1069)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:659)
            at com.mikepenz.iconics.context.InternalLayoutInflater.inflate(InternalLayoutInflater.java:81)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
            at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:773)
            at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659)
            at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:552)
            at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
            at appnamexxx.activity.MainActivity.onCreate(MainActivity.java:70)
            at android.app.Activity.performCreate(Activity.java:7802)
            at android.app.Activity.performCreate(Activity.java:7791)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
            at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
            at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    E/AndroidRuntime:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
            at android.os.Handler.dispatchMessage(Handler.java:107)
            at android.os.Looper.loop(Looper.java:214)
            at android.app.ActivityThread.main(ActivityThread.java:7356)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    
    bug question 
    opened by simone-gasparini 21
  • Problem with Spannable

    Problem with Spannable

    I try to use IconicsTextView with this:

    val spannable = SpannableString("{gmi-pin} my text bla bla bla")
    spannable.setSpan(ForegroundColorSpan(Color.MAGENTA), 0, 10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
    mytextView.Text = spannable
    
    

    but the Magenta Color does not appear. If I change the TextView color for all text without spannable it work.

    question 
    opened by carmas123 21
  • FloatingActionButton icon size too small

    FloatingActionButton icon size too small

    Hi mike

    I m using your lib to place an icon on a FloatingActionButton like this

    fab.setImageDrawable(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_share)
    .color(Color.WHITE).sizeDp(16));
    

    but the icon is too small.. even when i increase the sizeDp value.

    the xml of fab has layout width and height set to 30dp.

    question good to know 
    opened by AngleV 21
  • Too big icons on Kindle Fire HD (2013)

    Too big icons on Kindle Fire HD (2013)

    About this issue

    Hello,

    I am using your library in a word game wirtten in Java + androidx. Thanks a lot for your library, Mike.

    Now I am trying to port my app to Amazon Fire HD devices and have gotten the following test report by the Amazon review team:

    Actual Result: Observe that app contains distorted images Expected Result: The app should not display distorted/stretched/cropped images. Affected device list: Kindle Fire HD (2013) Kindle Fire HDX WAN (2013) Kindle Fire HDX (2013) Kindle Fire HDX 8.9 WAN (2013) Kindle Fire HDX 8.9 (2013) Fire Phone

    Words by Farber_Kindle Fire HD (2013)_screenshot

    Unfortunately, it is difficult to get additional details from Amazon review team, it is not possible to reply to them directly.

    In my app I use code like:

    private final PrimaryDrawerItem mPrivacyItem = new PrimaryDrawerItem()
            .withName(R.string.privacy_policy)
            .withIdentifier(R.id.navi_drawer_privacy)
            .withIcon(FontAwesome.Icon.faw_eye1)
            .withOnDrawerItemClickListener((view, position, drawerItem) -> {
                showPrivacyPolicy();
                return false;
            });
    

    And here are the libraries I use:

    implementation 'androidx.multidex:multidex:2.0.1'
    
    implementation 'com.squareup.okhttp3:okhttp:3.12.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.neovisionaries:nv-websocket-client:2.10'
    
    implementation "androidx.room:room-common:2.2.5"
    implementation "androidx.room:room-runtime:2.2.5"
    annotationProcessor "androidx.room:room-compiler:2.2.5"
    androidTestImplementation "androidx.room:room-testing:2.2.5"
    
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    annotationProcessor "androidx.lifecycle:lifecycle-common-java8:2.2.0"
    
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    implementation 'com.google.android.material:material:1.3.0-alpha02'
    
    implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
    implementation 'com.mikepenz:materialdrawer:6.1.2'
    implementation 'com.mikepenz:iconics-core:3.2.5'
    implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
    implementation "com.facebook.android:facebook-core:[5,6)"
    implementation "com.facebook.android:facebook-login:[5,6)"
    
    googleImplementation 'com.google.android.gms:play-services-auth:18.1.0'
    googleImplementation 'com.google.firebase:firebase-messaging:20.2.4'
    googleImplementation 'com.android.billingclient:billing:3.0.0'
    
    amazonCompileOnly files('libs/amazon-device-messaging-1.1.0.jar')
    amazonImplementation files('libs/login-with-amazon-sdk.jar')
    

    Do you please have an idea on how to workaround the issue?

    On my own Fire 5 and Fire 7 devices I do not see the problem:

    Screenshot_2020-08-22-21-06-26

    Thanks Alex

    Details

    • [3.2.5] Used library version
    • [4.0.1] Used gradle build tools version
    • [4.0.1] Used tooling / Android Studio version

    Checklist

    enhancement help wanted 
    opened by afarber 20
  • BottomNavigationView - selector not working

    BottomNavigationView - selector not working

    Using BottomNavigationView does currently not work with IconicsDrawables. The weird thing is that the default state color tinting works fine, but the selected state color is not working.

    Any ideas why? I checked the code and saw, tinting should be supported. And I check older issues and see that this should work, but it does not...

    question 
    opened by MFlisar 20
  • Problems with new Community Material

    Problems with new Community Material

    I experience problems with the latest Community Material typeface (3.7.95.1-kotlin). I use the typesafe icons in my code, for example CommunityMaterial.Icon.cmd_fullscreen_exit.

    The latest version now has 4 of such enums (Icon, Icon2, Icon3, Icon4), which makes individual icons really hard to discover. For example if I want the fullscreen icon, I would start to type Icon.fullscreen in my IDE and expect autocomplete to show me the available icons. This is now really tedious, because you need to try all 4 enums. I also had great personal pain just now, because I needed to update 100+ usage in my project, where the containing enum changed and I basically had to try all 4 variants :/.

    Another thing is this bug: getIcon only checks the first 2 enums and fails to find icons which are in the other two. I use cmd_filter_variant in my toolbar with the IconicsMenuInflaterUtil and that does not work anymore.

    Can we revert this to at most two enums? Or if we really have to, use some categories as names at least?

    enhancement question 
    opened by rubengees 19
  • java.lang.ClassNotFoundException: Didn't find class

    java.lang.ClassNotFoundException: Didn't find class "com.mikepenz.iconics.typeface.IconicsInitializer"

    Hi,

    About this issue

    • When trying to use Iconics in my project, everything compiles but got the following exception at runtime:\
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mikepenz.iconics.typeface.IconicsInitializer" on path: DexPathList[[zip file "/data/app/~~Y9mUoGVvvs8b8dXhJS8d-g==/org.maupu.android.tmh-JGOuacTk2XqRdLx2AQKJCQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~Y9mUoGVvvs8b8dXhJS8d-g==/org.maupu.android.tmh-JGOuacTk2XqRdLx2AQKJCQ==/lib/x86_64, /system/lib64, /system_ext/lib64]]
                                                                                                        	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
                                                                                                        	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                                                                                                        	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                                                                        	at com.mikepenz.iconics.typeface.library.community.material.Initializer.dependencies(Unknown Source:0) 
                                                                                                        	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:168) 
                                                                                                        	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) 
                                                                                                        	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) 
                                                                                                        	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) 
                                                                                                        	at android.content.ContentProvider.attachInfo(ContentProvider.java:2451) 
                                                                                                        	at android.content.ContentProvider.attachInfo(ContentProvider.java:2421) 
                                                                                                        	at android.app.ActivityThread.installProvider(ActivityThread.java:7462) 
                                                                                                        	at android.app.ActivityThread.installContentProviders(ActivityThread.java:6973) 
                                                                                                        	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6744) 
                                                                                                        	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                        	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133) 
                                                                                                        	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                        	at android.os.Looper.loopOnce(Looper.java:201) 
                                                                                                        	at android.os.Looper.loop(Looper.java:288) 
                                                                                                        	at android.app.ActivityThread.main(ActivityThread.java:7872) 
                                                                                                        	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                        	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
                                                                                                        	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 
    

    Details

    • [ ] Used library version v5.4.0

    • [ ] Used gradle build tools version 7.3.1

    • [ ] Used tooling / Android Studio version 2021.3.1 Patch 1

    Related to #582 but the workaround doesn't fix the issue ( I got a class conflict in that case)

    Anyone knows how to fix that ?

    opened by nmaupu 1
  • Update Google Material icons

    Update Google Material icons

    About this issue

    I'm using Google Rounded material and I'm frequently encountering missing icons compared to here (the link is an example of a missing icon)

    Details

    • [x] Used library version Google rounded material 4.0.0.1-kotlin@aar

    Checklist

    P.S. I think all icon packs need an update, not just this one. Last update was long ago.

    opened by Nek-12 8
  • Shadows with Compose

    Shadows with Compose

    About this issue

    I am trying to create a shadow around an icon shape using Jetpack Compose. I can't seem to find a way. Adding a standard Modifier.shadow adds shadow around the rectangular box. Is there a way I missed? Or is this a future feature...

    Details

    • [ ] Used library version -> 5.3.2

    Checklist

    enhancement help wanted feature 
    opened by ade 1
  • Some icons are incorrectly rendered with `IconicsTextView` + XML

    Some icons are incorrectly rendered with `IconicsTextView` + XML

    About this issue

    Some icons are incorrectly rendered with IconicsTextView + XML.

    • Pixel C emulator: image

    • Samsung Galaxy S20 Ultra: image

    Sample code:

    <com.mikepenz.iconics.view.IconicsTextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text="@string/title_statistics_chart_success"
      android:textAppearance="?attr/textAppearanceBody2" />
    
    <string name="title_statistics_chart_success">{gmd-trending-up} Success</string>
    

    Details

    • Used support library version: androidx.appcompat:appcompat:1.4.0-alpha03
    • Used gradle build tools version 4.2.2 / 7.1.1
    • Used tooling / Android Studio version: 4.2.2
    • Used library version: 5.2.8, 5.3.0-b01

    Fonts:

    • com.mikepenz:google-material-typeface:4.0.0.1-kotlin@aar
    • com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar
    help wanted 
    opened by dummyco 13
Releases(v5.4.0)
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
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
Over 1600 customizable icons for Android including 750+ Google Material Design icons, 25 ready-made social badges, and more!

droidicon - Over 1600 icons for Android! Icons From... Google Material Design FontAwesome Iconic Entypo Meteocons Unicode Icons Your own custom icons

Devon Guinane 2.2k Dec 19, 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
Converts SVG and Android Vector Drawable in Jetpack Compose code

SVG to Compose [Experimental] Converts SVG or Android Vector Drawable to Compose code. Android Studio/IntelliJ plugin by overpass Why this project On

Gabriel Souza 244 Dec 26, 2022
PaintableVectorView enables to change color of paths/groups in Vector Drawable (SVG)

PaintableVectorView PaintableVectorView enables to change color of paths/groups in Vector Drawable (SVG) Demo Car icon made by Prosymbols from www.fla

Jakub Anioła 164 Dec 16, 2022
Transforms a Vector Drawable or a SVG path to a Compose ImageVector

Svg2Compose Transforms a Vector Drawable or a SVG path to a Compose ImageVector. Download Download the latest version (Windows) here: Releases. How to

Denis Mondon 18 Dec 22, 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
Custom font library for android | Library to change/add font of Entire Android Application at once without wasting your time - TextViews, EditText, Buttons, Views etc.,

AppFontChanger In a Single shot change font of Entire Android Application - TextViews, EditText, Buttons, Views etc., Kindly use the following links t

Prabhakar Thota 48 Aug 10, 2022
Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too.

LoadingDrawable: Android cool animation collection 前言 CircleRotate源码解析 Fish源码解析 LoadingDrawable is some android animations implement of drawable: a li

dinus_developer 4.1k Dec 27, 2022
An ActivityScenario extension and a Junit4 TestRule to simulate changing the font size on a device/emulator, as it would be done by going to Settings > display > Font size

FontSizeActivityScenario and FontSizeTestRule An ActivityScenario and a Junit4 TestRule to be used together with its org.junit.runners.Parameterized.

Sergio Sastre Flórez 19 Jan 6, 2022
Use a jar executable to create a Drawable class to display a SVG on Android.

SVG2Drawable Use a jar executable to create a Drawable class to display a SVG on Android. This is a standalone library, not a Runtime Android library.

Stan Kocken 202 Nov 28, 2022
Use a jar executable to create a Drawable class to display a SVG on Android.

SVG2Drawable Use a jar executable to create a Drawable class to display a SVG on Android. This is a standalone library, not a Runtime Android library.

Stan Kocken 202 Nov 28, 2022
Android Studio's Vector Drawable conversion tool in convenient packaging.

Vector Drawable Tool This repository is simply a repackaging of the vector drawable tool from the Android Studio source code. The included Gradle file

Ryan Harter 55 Sep 26, 2022
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 Intellij platform plugin to view truetype font file(.ttf) that includes icon glyphs usually

Icon Font Viewer 一个用于查看.ttf字体文件的Intellij平台(支持IDEA/Android Studio等)的插件,通常用于展示icon

null 7 Oct 22, 2022
🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files.

DrawableToolbox English | 中文 The missing DrawableToolbox for Android. Create drawables programmatically and get rid of the boring and always repeated

Hong Duan 1.1k Jan 4, 2023
An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Hans Petter Eide 165 Nov 11, 2022
Simple example how you can use dynamic color image vector in your app.

Dynamic Color ImageVector Simple example how you can use dynamic color image vector in your app. How to use 1. Create a xml image vector The content o

Lucas Martins 1 Oct 28, 2022
Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images)

VectAlign VectAlign (a.k.a. VectorDrawableAlign) is a developer's tool which automagically aligns two VectorDrawable "pathData" strings (or SVG images

Stefano Bonetta 2k Dec 29, 2022