Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...

Overview

Note: Due to lack of time, Iconify is no longer maintained and icon packs are outdated. I'd be very happy to welcome a new contributor, please reach me on twitter @JoanZap if by any chance you're interested. 🙂

Iconify offers you a huge collection of vector icons to choose from, and an intuitive way to add and customize them in your Android app. It has been introduced in this blog post which is a good place to get started.


Install

Pick any number of modules and declare them in your Application.

dependencies {
    compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' // (v4.5)
    compile 'com.joanzapata.iconify:android-iconify-entypo:2.2.2' // (v3,2015)
    compile 'com.joanzapata.iconify:android-iconify-typicons:2.2.2' // (v2.0.7)
    compile 'com.joanzapata.iconify:android-iconify-material:2.2.2' // (v2.0.0)
    compile 'com.joanzapata.iconify:android-iconify-material-community:2.2.2' // (v1.4.57)
    compile 'com.joanzapata.iconify:android-iconify-meteocons:2.2.2' // (latest)
    compile 'com.joanzapata.iconify:android-iconify-weathericons:2.2.2' // (v2.0)
    compile 'com.joanzapata.iconify:android-iconify-simplelineicons:2.2.2' // (v1.0.0)
    compile 'com.joanzapata.iconify:android-iconify-ionicons:2.2.2' // (v2.0.1)
}
public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Iconify
            .with(new FontAwesomeModule())
            .with(new EntypoModule())
            .with(new TypiconsModule())
            .with(new MaterialModule())
            .with(new MaterialCommunityModule())
            .with(new MeteoconsModule())
            .with(new WeathericonsModule())
            .with(new SimpleLineIconsModule())
            .with(new IoniconsModule());
    }
}

Show icons in text widgets

If you need to put an icon on a TextView or a Button, use the { } syntax. The icons act exactly like the text, so you can apply shadow, size and color on them!

<com.joanzapata.iconify.widget.IconTextView
    android:text="I {fa-heart-o} to {fa-code} on {fa-android}"
    android:shadowColor="#22000000"
    android:shadowDx="3"
    android:shadowDy="3"
    android:shadowRadius="1"
    android:textSize="40sp"
    android:textColor="#FF..."
    ... />

Icon options

  • Shall you need to override the text size of a particular icon, the following syntax is supported {fa-code 12px}, {fa-code 12dp}, {fa-code 12sp}, {fa-code @dimen/my_text_size}, and also {fa-code 120%}.
  • In the same way you can override the icon color using {fa-code #RRGGBB}, {fa-code #AARRGGBB}, or {fa-code @color/my_color}.
  • You can even easily spin an icon like so {fa-cog spin}.

Show an icon where you need a Drawable

If you need an icon in an ImageView or in your ActionBar menu item, 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, FontAwesomeIcons.fa_share)
   .colorRes(R.color.ab_icon)
   .actionBarSize());

Extensibility

In case you can't find the icon you want, you can extend the available icon directly from your app. All you need to do is to implement IconFontDescriptor with a .ttf file in your assets and provide the mapping between keys and special characters, then give it to Iconify.with(). You can use the FontAwesomeModule as an example.

There are no constraints on the icon keys, but I strongly suggest you use a unique prefix like my- or anything, to avoid conflicts with other modules. FYI, if there is a conflict, the first module declared with Iconify.with() has priority.

The only dependency you need if you want to use a custom icon is Iconify core.

compile 'com.joanzapata.iconify:android-iconify:2.2.2'

Contributions

License

Copyright 2015 Joan Zapata

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 FontAwesome font by Dave Gandy, 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
    
Comments
  • Exception while Running

    Exception while Running

    I've been working on an application that uses android-iconify recently and was using IconButton and IconTextView which worked a few days ago. I noticed a new commit was made 2 hours ago and I believe is the cause of the issue. It looks like the Font was moved but the name was not updated and causes the following exception.

    10-21 18:06:49.410 1741-1741/net.codesector.Mileage E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: net.codesector.Mileage, PID: 1741 java.lang.RuntimeException: Unable to start activity ComponentInfo{net.codesector.Mileage/net.codesector.Mileage.LoginActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class android.widget.IconTextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5017) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class android.widget.IconTextView at android.view.LayoutInflater.createView(LayoutInflater.java:621) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697) at android.view.LayoutInflater.rInflate(LayoutInflater.java:756) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290) at android.app.Activity.setContentView(Activity.java:1929) at net.codesector.Mileage.LoginActivity.onCreate(LoginActivity.java:14) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5017)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)             at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createView(LayoutInflater.java:595)             at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)             at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)             at android.view.LayoutInflater.inflate(LayoutInflater.java:492)             at android.view.LayoutInflater.inflate(LayoutInflater.java:397)             at android.view.LayoutInflater.inflate(LayoutInflater.java:353)             at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)             at android.app.Activity.setContentView(Activity.java:1929)             at net.codesector.Mileage.LoginActivity.onCreate(LoginActivity.java:14)             at android.app.Activity.performCreate(Activity.java:5231)             at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5017)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)             at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: native typeface cannot be made at android.graphics.Typeface.(Typeface.java:175) at android.graphics.Typeface.createFromFile(Typeface.java:159) at com.joanzapata.android.iconify.Iconify.getTypeface(Iconify.java:80) at com.joanzapata.android.iconify.Iconify.addIcons(Iconify.java:53) at android.widget.IconTextView.init(IconTextView.java:46) at android.widget.IconTextView.(IconTextView.java:36)             at java.lang.reflect.Constructor.constructNative(Native Method)             at java.lang.reflect.Constructor.newInstance(Constructor.java:423)             at android.view.LayoutInflater.createView(LayoutInflater.java:595)             at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)             at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)             at android.view.LayoutInflater.inflate(LayoutInflater.java:492)             at android.view.LayoutInflater.inflate(LayoutInflater.java:397)             at android.view.LayoutInflater.inflate(LayoutInflater.java:353)             at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)             at android.app.Activity.setContentView(Activity.java:1929)             at net.codesector.Mileage.LoginActivity.onCreate(LoginActivity.java:14)             at android.app.Activity.performCreate(Activity.java:5231)             at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5017)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)             at dalvik.system.NativeStart.main(Native Method)

    bug 
    opened by tkrause 18
  • Spin not working on Chinese 10

    Spin not working on Chinese 10" tablet (Jellybean)

    I have compiled these two modules, compile 'com.joanzapata.iconify:android-iconify-material:2.0.8' compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.0.8'

    then in Application initialized these modules Iconify.with(new FontAwesomeModule()) .with(new MaterialModule());

    tried this as it is

    < com.joanzapata.iconify.widget.IconTextView android:text="{fa-heart spin}" android:shadowColor="#22000000" android:shadowDx="3" android:shadowDy="3" android:shadowRadius="1" android:textSize="40sp" android:textColor="#FFF"/>

    then there was only little rotation in the heart icon, no rotation animation worked. even i have tried refresh icon.

    Anything I am missing ?

    bug 
    opened by ch-muhammad-adil 16
  • Icons size dont show correctly on my test

    Icons size dont show correctly on my test

    Hi all. i'm trying to use this awesome library, but after using and testing that. my icons size are very small and i dont know why dont show in 5 size. for example this is my test:

    <IconTextView
        android:id="@+id/imgv_search"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:background="@drawable/button_animate_click_action"
        android:clickable="true"
        android:padding="10dp"
        android:src="@drawable/icon_search"
        android:text="{fa-list-alt}"
        android:textColor="#ffffff"/>
    

    i'm attarched image result of test. please help me to set correct size. Thanks :)

    Image URL:https://cloud.githubusercontent.com/assets/6617583/9026522/116f4a00-3947-11e5-8956-b60ec4e69dc5.png

    question 
    opened by pishguy 15
  • Cannot Use it in NavigationView

    Cannot Use it in NavigationView

    I cannot use it in NavigationView. I tried the Following Code:

            Drawable icon = new IconDrawable(this, Iconify.IconValue.fa_envelope).colorRes(R.color.colorAccent).actionBarSize();
            navigationView.getMenu().findItem(R.id.nav_first_fragment).setIcon(icon);
    

    The Following is the Log:

    07-27 03:16:42.887  32197-32197/com.i10studios.websiteinformer E/AndroidRuntime﹕ FATAL EXCEPTION: main
        java.lang.NullPointerException
                at android.support.design.internal.NavigationMenuItemView.setIcon(NavigationMenuItemView.java:113)
                at android.support.design.internal.NavigationMenuItemView.initialize(NavigationMenuItemView.java:72)
                at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.getView(NavigationMenuPresenter.java:305)
                at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:230)
                at android.widget.AbsListView.obtainView(AbsListView.java:2603)
                at android.widget.ListView.makeAndAddView(ListView.java:1840)
                at android.widget.ListView.fillDown(ListView.java:681)
                at android.widget.ListView.fillFromTop(ListView.java:742)
                at android.widget.ListView.layoutChildren(ListView.java:1661)
                at android.widget.AbsListView.onLayout(AbsListView.java:2426)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:931)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
                at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
                at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
                at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
                at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
                at android.view.View.layout(View.java:14905)
                at android.view.ViewGroup.layout(ViewGroup.java:4601)
                at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2213)
                at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2027)
                at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1237)
                at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5162)
                at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
                at android.view.Choreographer.doCallbacks(Choreographer.java:591)
                at android.view.Choreographer.doFrame(Choreographer.java:561)
                at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
                at android.os.Handler.handleCallback(Handler.java:725)
                at android.os.Handler.dispatchMessage(Handler.java:92)
                at android.os.Looper.loop(Looper.java:176)
                at android.app.ActivityThread.main(ActivityThread.java:5317)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:511)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
                at dalvik.system.NativeStart.main(Native Method)
    
    opened by syedalinaqi 14
  • Support for spinning icons?

    Support for spinning icons?

    I was wondering how do i use spinning icons.

    I tried with {fa-spinner fa-spin} and {fa-spinner} {fa-spin} but none of them worked.

    So, am I going wrong somewhere or iconify doesn't support spinning icons?

    enhancement 
    opened by rampatra 13
  • Use with appCompat 21 Toolbar

    Use with appCompat 21 Toolbar

    How would we use this with the Toolbar icon in AppCompat v21?

    This code errors:

    mToolbar.setLogo(new IconDrawable(this, Iconify.IconValue.fa_share).colorRes(R.color.default_dark));

    with:

    java.lang.NoClassDefFoundError: com.joanzapata.android.iconify.IconDrawable

    question 
    opened by Dreamystify 10
  • Auto-mirroring support in RTL mode

    Auto-mirroring support in RTL mode

    IconDrawable has been modified to support auto-mirroring by default if supported by the icon. I have also added an IconImageView widget with custom attributes at edx/edx-app-android@d2d4fc6084ba63b3d5bda40a7c2b45258a16b778 to support XML definitions, but in order to add that here this project would need to be changed to an Android library module, which I don't have any experience with and probably requires integrating with Gradle. If you or someone else manages to make this transition, I'll be happy to include that commit here as well.

    opened by 1zaman 9
  • String Resource File

    String Resource File

    I've created a string resource file that can be included in your android project to make the icon values easy to reference reference. I know you can use the enum within the library, but I needed an easy way to be able to alias the icon names.

    https://gist.github.com/keannan5390/9487918

    Then you can use it like this:

    TextView icon = (TextView)findViewById(R.id.icon_name);
    icon.setText(R.string.icon_user);
    Iconify.addIcons(icon);
    

    or this:

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="12sp"
        android:id="@+id/icon_name"
        android:text="@string/icon_user"/>
    
    opened by ghost 9
  • How to get IconTextView text programatically?

    How to get IconTextView text programatically?

    Hope you can help, I have a xml resource file with a IconTextView:

    < android.widget.IconTextView android:id="@+id/article_item_like" android:layout_width="wrap_content" android:layout_height="wrap_content" android:shadowColor="#22000000" android:shadowDx="3" android:shadowDy="3" android:shadowRadius="1" android:text="{fa-heart}" android:textColor="#FF33B5E5" android:textSize="30sp" />

    In order to complete a feature, i need to get the value of that item. But when i try to get the value:

    Log.i("MyTag", "This is the text:" + myIconTextView.getText().toString());

    I just get a strange char in console. Is there a way to get this value? pe. Get "{fa-heart}".

    Thanks!

    opened by ImTosS 8
  • IllegalStateException: Cannot create Iconify font destination folder

    IllegalStateException: Cannot create Iconify font destination folder

    Hi there, We are using iconify library in the AntennaPod app. One of our users running Android 5.0 on a One Plus One got the following exception:

    android.view.InflateException: Binary XML file line #40: Error inflating class android.widget.IconTextView
    at android.view.LayoutInflater.createView(LayoutInflater.java:633)
    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
    at de.danoeh.antennapod.adapter.NavListAdapter.getView(NavListAdapter.java:173)
    at android.widget.AbsListView.obtainView(AbsListView.java:2346)
    at android.widget.ListView.measureHeightOfChildren(ListView.java:1270)
    at android.widget.ListView.onMeasure(ListView.java:1182)
    at android.view.View.measure(View.java:17429)
    at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463)
    at android.view.View.measure(View.java:17429)
    at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:866)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2815)
    at android.view.View.measure(View.java:17429)
    at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)
    at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1166)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5786)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
    at android.view.Choreographer.doCallbacks(Choreographer.java:580)
    at android.view.Choreographer.doFrame(Choreographer.java:550)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
    Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
    at android.view.LayoutInflater.createView(LayoutInflater.java:607)
    ... 51 more
    Caused by: java.lang.IllegalStateException: Cannot create Iconify font destination folder
    at com.joanzapata.android.iconify.Utils.resourceToFile(Utils.java:66)
    at com.joanzapata.android.iconify.Iconify.getTypeface(Iconify.java:80)
    at com.joanzapata.android.iconify.Iconify.addIcons(Iconify.java:53)
    at android.widget.IconTextView.init(IconTextView.java:46)
    at android.widget.IconTextView.<init>(IconTextView.java:36)
    ... 54 more
    
    opened by mfietz 8
  • Android 5.0 textSize issue

    Android 5.0 textSize issue

    I believe this issue is similar to #71 and #53

    Text in buttons, IconTextView and normal Textviews have the following effect. (Exact same code on different devices)

    Lollipop: Lollipop

    Below Lollipop: Below Lollipop

    bug 
    opened by squeeish 8
  • Duplicate classes when importing this project into mine

    Duplicate classes when importing this project into mine

    Hi!

    I wal just trying out your project into an ongoing one... But when I tried building, It didn't work, and I got tons of errer of duplicate classes, like this:

    Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-v4-22.2.1-runtime (com.android.support:support-v4:22.2.1)
    Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-v4-22.2.1-runtime (com.android.support:support-v4:22.2.1)
    Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-v4-22.2.1-runtime (com.android.support:support-v4:22.2.1)
    ...
    
    Go to the documentation to learn how to Fix dependency resolution errors.
    

    This is my app gradle file:

    plugins {
        id 'com.android.application'
        id 'org.jetbrains.kotlin.android'
    }
    
    android {
        compileSdk 32
    
        defaultConfig {
            applicationId "com.example.controlasistenciafincalolita.clientemovil"
            minSdk 18
            targetSdk 32
            versionCode 1
            versionName "1.0"
    
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        kotlinOptions {
            jvmTarget = '1.8'
        }
        buildFeatures {
            viewBinding true
        }
    }
    
    dependencies {
    
        implementation 'com.journeyapps:zxing-android-embedded:4.2.0'
        implementation 'androidx.core:core-ktx:1.7.0'
        implementation 'androidx.appcompat:appcompat:1.3.0'
        implementation 'com.google.android.material:material:1.4.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
        implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
        implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
        implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2' // (v4.5)
        testImplementation 'junit:junit:4.13.2'
        androidTestImplementation 'androidx.test.ext:junit:1.1.3'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    }
    

    These errors go away as soon as I comment out any code and dependencies of this repo.

    I appreciate your help. I'll gladly provide any other details needed.

    Regards!

    opened by 71walceli 0
  • can not support com.android.support:appcompat-v7:28.0.0

    can not support com.android.support:appcompat-v7:28.0.0

    When android studio version 3.2 and android sdk28 were introduced, iconify relied on compile times errors.DexArchiveMergerException.When I lowered the SDK version to 27, changing the support support package to 27.1.1 was resolved.This problem is solved and it is even better to support the latest support package.

    opened by sunnnydaydev 2
  • Cut off part of the icon - fa_taxi

    Cut off part of the icon - fa_taxi

    layout

    <android.support.design.widget.NavigationView
            android:id="@+id/nav_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true"
            app:menu="@menu/drawer_view"
            app:headerLayout="@layout/nav_header"/>
    

    drawer_view

    <?xml version="1.0" encoding="utf-8"?>
    <menu xmlns:android="http://schemas.android.com/apk/res/android" >
            <item
                android:id="@+id/cars"
                android:title="@string/cars" />
            <item
                android:id="@+id/history"
                android:title="@string/trips_history" />
    </menu>
    

    activity

    Menu menu = navigationView.getMenu();
    
    MenuItem carsItem = menu.findItem(R.id.cars);
    carsItem.setIcon(new IconDrawable(this, FontAwesomeIcons.fa_taxi)
                    .color(ContextCompat.getColor(this, R.color.gray)));
    

    screenshot_2018-10-04-19-53-56-046_com vitvetal_taxi taxidriver

    opened by ViTVetal 0
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

Xamarin 1.8k Jan 5, 2023
SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon.

Smiley Rating SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon. Drawn completely using android canvas Insp

Sujith Niraikulathan 1.1k Dec 22, 2022
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem

Android-ActionItemBadge ActionItemBadge is a library which offers a simple and easy to use method to add a badge to your action item! Screenshots Incl

Mike Penz 1.3k Jan 1, 2023
A material Switch with icon animations and color transitions

Material Animated Switch A material Switch with icon animations and color transitions Sample video: Youtube Material Animated Switch video Sample app:

Adrián Lomas 1.2k Dec 29, 2022
MIUINativeNotifyIcon - Fix the native notification bar icon function abandoned by the MIUI development team

MIUI 原生通知图标 Fix the native notification bar icon function abandoned by the MIUI

Fankesyooni 189 Jan 4, 2023
Android library for multiple snapping of RecyclerView

MultiSnapRecyclerView Gradle dependencies { implementation 'com.github.takusemba:multisnaprecyclerview:x.x.x' } Features This is an Android Libra

TakuSemba 2.5k Jan 4, 2023
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

Pedro Vicente Gómez Sánchez 3k Dec 6, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Shashank Singhal 350 Dec 9, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022