You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hate to ask something I feel I'd have to research on my own but I feel lost. Is it possible to use the fontawesome ones inside FloatingActionButton directly?
The text was updated successfully, but these errors were encountered:
// For font awesome icon keys, look at cheat sheet: http://fontawesome.io/cheatsheet/
IconDrawable icon = new IconDrawable(getContext(), "fa-building");
// Default size is designed to suit normal sized FABs
if (myFab.getSize() == FloatingActionButton.SIZE_MINI) {
icon.sizeDp(18);
// Stretched by default, looks ok on normal sized ones but duff on mini ones
myFab.setScaleType(ScaleType.CENTER);
}
myFab.setImageDrawable(icon);
I took this one step further and subclassed the FloatingActionButton to check for my own set of styleables, so I can set the fontAwesome icon key in XML with a custom attribute. Essentially it does the same as the above code, though.
I hate to ask something I feel I'd have to research on my own but I feel lost. Is it possible to use the fontawesome ones inside FloatingActionButton directly?
The text was updated successfully, but these errors were encountered: