zendesk / android-floating-action-button

Floating Action Button for Android based on Material Design specification
Apache License 2.0
6.38k stars 1.45k forks source link

Icon for FAB Menu Subitem #316

Open danksky opened 8 years ago

danksky commented 8 years ago

How can I add an icon to the menu subitem?

webjoel commented 7 years ago

To see how the buttons are added to your xml layouts, check the sample project.

williamsiuhang commented 7 years ago

Menu icon didn't work for me in xml, so I ended up doing it in Java:

FloatingActionButton btn = view.findViewById(R.id.buttonID);
btn.setIcon(R.drawable.myimage);

I also downloaded the library to use in my project locally, not sure if that makes a difference.