How to use Font Awesome icon in android application?

后端 未结 9 2109
时光说笑
时光说笑 2020-12-02 20:58

I want to use Font Awesome\'s icon set in my android application. I have some TextView to set those icons. I don\'t want to use any png image. My Textview is li

9条回答
  •  盖世英雄少女心
    2020-12-02 21:38

    As there was no really comfortable way of including FontAwesome in my Android projects,

    I created a Github Repository that helps use FontAwesome with Kotlin rather than Java.

    The repository helps you dynamically switch between FontAwesome types (solid, regular and brands). Dynamic example (see code):


    Resources

    • The mentioned code: GitHub Repository
    • How to use it: examples
    • Very helpful for choosing icons: The FontAwesome Cheatsheet

    I learned a lot through all the answers here, so thank you everybody! I hope this answer is helpful to you too!

提交回复
热议问题