Search code examples
androidandroid-layoutmaterial-designfloating-action-button

Add menu options to Floating Action Buttons


I am looking for adding menu items for the floating action buttons (FAB) in android application.

Means, when i click the FAB i want actions like "Save", "Save & Add New", "Go Back" etc.

As I am pretty new to the development, I couldn't try much of experimentation on this

Somehow unable to get this going... currently i have the default button which when clicked shows the snack bar suggesting me to have my own icon.

please help, thanks.

Lakshman.


Solution

  • You should use the FloatingActionMenu for achieving such functionality. You can take a look at this project on Github by Clans.