I am using Floating Action Button. I am using this library because I needed inbox style fab. The problem is, I can close the floating action menu only on clicking the bottom fab. What I need is, if I click anywhere else on the screen, then also the fab should collapse as happens in Inbox app. How to achieve this behavior? Is there any attributes in this library that I can use or do I need to implement that behavior on my own?
The library has a method setClosedOnTouchOutside(boolean close) which you can use.
floatingActionMenu.setClosedOnTouchOutside(true);
But this will only be workable for floatingActionMenu's covered area. If you wanna close it by clicking anywhere in the layout then you should try this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With