FloatingActionButton
FloatingActionButton copied to clipboard
How to block or not the click event on expand or collapse correspondingly?
I want it to block click events when the menu is open but do not block touch or click events when the menu is collapsed. I can't find a on Collapse or Expand Event. How to access this event so I can set setClickable to true or false when needed.
+1
+1 I can't believe there isn't a collapse() and expand() method ...
Actually there is !
You need to use FloatingActionMenu in your layout (like it is shown in the readme.xml) Then it is easy to collapse or expand your FAB menu.
FloatingActionsMenu fab = (FloatingActionsMenu) root.findViewById(R.id.multiple_actions);
fab.collapse();
if this solves your problem, please close this issue.
No. It doesn't solve the problem. If you read the problem statement:
I want it to block click events when the menu is open(expanded) but do not block touch or click events when the menu is collapsed.
so basically we need these events:
I can't find a
onCollapseandonExpandevents.
More favorable solution is to make the FabMenu not block click events when collapsed, automatically, but do block when expanded.
+1
check the new close(boolean animated) method ;
fabMenu.close(true)
this should close the issue