Introduction

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

Tutorial Video


Informations

Creator
atermenji
atermenji
Git URL:
Language
Java
Min SDK:
Android 2.1
License:
Apache Version 2.0
Created At:
Dec 05, 2012
Last Updated:
Jan 18, 2018
Star:
392
Fork:
120
Watcher count:
33
Tags

Description

IconicDroid Build Status Android Arsenal

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

Try out the sample application on the Google Play. IconicDroid example

Usage

Including in your project

IconicDroid is presented as an Android library project. It is not a standalone JAR because fonts are stored as a raw resources.

You can include this project by referencing it as a library project in Eclipse or ant.

Sample usage

Code:

IconicFontDrawable iconicFontDrawable = new IconicFontDrawable(getContext());
iconicFontDrawable.setIcon(EntypoSocialIcon.GITHUB);
iconicFontDrawable.setIconColor(Color.GREEN);

findViewById(R.id.some_view).setBackground(iconicFontDrawable);

Available fonts

  • Entypo pictograms by Daniel Bruce — www.entypo.com
  • FontAwesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome/
  • Iconic font by P.J. Onori - http://somerandomdude.com/work/iconic/

License

Note that all fonts have their own license.

Step by Step

Step by Step Tutorial

Step1: Add Iconic Droid as a Eclipse Module

- View tutorial video to get the step include module

 

Step2: Add a textview inside your layout file

<TextView android:id="@+id/txt" android:layout_width="50dp"
        android:layout_height="50dp" />

Remember to add layout_width & layout_height, if you set to wrap_content it will not shown :D

 

Step 3: Set the image for textview

        TextView txt = (TextView) findViewById(R.id.txt);
        IconicFontDrawable iconicFontDrawable = new IconicFontDrawable(getApplicationContext());
        //Choose your icon here
        iconicFontDrawable.setIcon(EntypoSocialIcon.C_GOOGLE_PLUS);
        //Choose icon color
        iconicFontDrawable.setIconColor(Color.GRAY);
        //SEt image to textView
        txt.setBackground(iconicFontDrawable);

 

All set, you are DONE!

Discussion