Android Font Awesome

Source link:

How to add font awesome in Android? here sample code from Ravi who ownder Thank you

Android - Font Awesome Icon

Awesome Android library to use the Font Awesome Icon collection in your android apps. This library contains the latest font awesome icon collection (v5.7.2).




Here you can find detailed explain of the library and the usage of it considering multiple scenarios. Or you can refer this example project.

How to Use

Include the fontawesome dependency in app s build.gradle and you are good to go.

dependencies {

  // font awesome library
  implementation  info.androidhive:fontawesome:0.0.5  

Referring Icon:

Font Awesome provides three set of icons Regular, Solid and Brand. All the icons can be referred from Strings resource file. For example,

@string/fa_map - Regular map icon

@string/fa_heart_solid - Solid heart icon

@string/fa_facebook - Facebook brand icon.

Displaying Text Icon: FontTextView

To display an icon in xml layout, use the FontTextView widget. This class is extended from TextView, so all the TextView related properties will apply.







 app:solid_icon="true" />

solid_icon: Use this attribute to display a solid icon (true / false). brand_icon: Use this attribute to display a brand icon (true / false).

Displaying drawable Icon: FontDrawable

If you want to set an icon to a widget (buttons, menus, bottom sheet, navigation drawer), use the FontDrawable class to create font awesome drawable.

Here Paper Plane icon is set to Floating Action Button

FloatingActionButton fab = findViewById(;
  // using paper plane icon for FAB FontDrawable drawable = new FontDrawable(this, R.string.fa_paper_plane_solid, true, false);
  // white color to icon drawable.setTextColor(ContextCompat.getColor(this, android.R.color.white));

Displaying Icons in Menus (Bottom Navigation, Navigation Drawer, Toolbar etc.,)

You can also display Font Awesome icons in UI elements those use menu file to render items. In the below example, font awesome icons are set to Navigation Drawer items.

public class MainActivity extends AppCompatActivity

implements NavigationView.OnNavigationItemSelectedListener {

  protected void onCreate(Bundle savedInstanceState) {





  * Changing navigation drawer icons 
  * This involves looping through menu items and applying icons 
  private void intDrawerLayout() {

NavigationView navigationView = findViewById(;


 ImageView iconHeader = navigationView.getHeaderView(0).findViewById(;

FontDrawable drawable = new FontDrawable(this, R.string.fa_font_awesome, false, true);

drawable.setTextColor(ContextCompat.getColor(this, android.R.color.white));



 int[] icons = {

  R.string.fa_home_solid, R.string.fa_calendar_alt_solid, R.string.fa_user_solid,

  R.string.fa_heart_solid, R.string.fa_comment_solid, R.string.fa_dollar_sign_solid, R.string.fa_gift_solid


renderMenuIcons(navigationView.getMenu(), icons, true, false);

 int[] iconsSubmenu = {
R.string.fa_cog_solid, R.string.fa_sign_out_alt_solid

 renderMenuIcons(navigationView.getMenu().getItem(7).getSubMenu(), iconsSubmenu, true, false);


  * Looping through menu icons are applying font drawable 
  private void renderMenuIcons(Menu menu, int[] icons, boolean isSolid, boolean isBrand) {

for (int i = 0; i < menu.size();
 i++) {

 MenuItem menuItem = menu.getItem(i);

 if (!menuItem.hasSubMenu()) {

  FontDrawable drawable = new FontDrawable(this, icons[i], isSolid, isBrand);

  drawable.setTextColor(ContextCompat.getColor(this, R.color.icon_nav_drawer));








This library includes the Free font awesome icons only, premium icons are not available.


TextView, EditText and Button with custom fonts with normal, bold and thin style for different languages.

When the language of device changes the library automatically use the font for that language.

In-App Feedback and Bug Reporting for Mobile Apps

The top apps in the world rely on Instabug for beta testing, user engagement, and crash reporting. Gather feedback from your beta testers and have live conversations with your users.

Error Handle Of Rxjava.

LoggingInterceptor - An OkHttp Interceptor which pretty logs request and response data.

An arc based android color picker library.

Chrome CustomTabs for Android demystified. Simplifies development and provides higher level classes including fallback in case Chrome isn't available on device.


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes