Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Font Awseome icon on Floating Action Button?

I am trying to use font awesome icons for floating Action Button. I am not able to implement below solution . https://github.com/futuresimple/android-floating-action-button/issues/59

like image 983
Poonam Kukreti Avatar asked Feb 08 '23 23:02

Poonam Kukreti


1 Answers

You should be using official Font Awesome Library,

https://github.com/bperin/FontAwesomeAndroid

there is DrawableAwesome in FontAwesome Library, that you need to construct it by using

DrawableAwesome drable = new DrawableAwesome.DrawableAwesomeBuilder(Context context, int icon).build();

and set in your FAB. int icon is id of String resource You can also customize rendering options like Shadow, Bold etc, Just check DrawableAwesome

Another library is available, In case anyone wants to check. https://github.com/JoanZapata/android-iconify

like image 56
QAMAR Avatar answered Feb 11 '23 12:02

QAMAR