Search code examples
androidfloating-action-button

Close floating action button Android


I used the following library https://github.com/futuresimple/android-floating-action-button and everything works fine.
How do I close the menu automatically after clicking on one of the buttons on the same menu?


Solution

  • Its open-source lib, You can read the source code and find that by your self.

    FloatingActionsMenu.collapse(); // close the menu
    FloatingActionsMenu.toggle(); // toggle the menu
    FloatingActionsMenu.expand(); // open the mneu
    

    In the Click listener of the Menu Item call .collapse()