The complete Font Awesome 4.3.0 icon reference for Android.
How to use:
- Upload
fontawesome.xml
tores/values
folder. - Set text on any of your element:
<button android:id="@+id/FOO" ... android:text="@string/fa_glass" ... />
- Load
.ttf
font and set typeface
How to set typeface:
- Upload fontawesome
.ttf
font file to assets folder
Typeface font = Typeface.createFromAsset( getAssets(), "fontawesome-webfont.ttf" );
...
Button button = (Button)findViewById( R.id.FOO );
button.setTypeface(font);
OR
Better font loading techniques for android here
How to update: When a new Font Awesome version is released, follow the steps below:
- Install Node.js
- Navigate to this repository's directory and execute
npm install js-yaml
- Download the latest icons.yaml file into the repository's directory
- Execute
node generate.js
- That's it! 👍 The
fontawesome.xml
file will now be up-to-date
Font Awesome or Font Awesome on GitHub
Thanks to @sergiopantoja for updating to 4.3.0 version.