(FontAwesome) Iconify Android Text Library

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

Check it out here...

Now reduce images in your android project and use iconify (FontAwesome)https://github.com/JoanZapata/android-iconify

OR...

Download the font-awesome.zip from fontawesome-webfont.ttf from http://fortawesome.github.io/Font-Awesome/
Extract it and put the fontawesome-webfont.ttf  file in your assets/font/ directory of your android project

In your XML layout file ::


<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/icon_credit_card"
    android:textSize="50sp"
    android:textColor="#009012"
    android:textAppearance="?android:attr/textAppearanceLarge" />

 In class file :


TextView txtTitle = (TextView) findViewById(R.id.textView1); 
 
Typeface font = Typeface.createFromAsset(getAssets(), 
                         "fontawesome-webfont.ttf");
txt.setTypeface(font);
 
txtTitle.setText("\uf17b"+"Android..."); 

and run the code.
Happy FontAwsome.

Comments