FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

How to block or not the click event on expand or collapse correspondingly?

Open ahmadalibaloch opened this issue 9 years ago • 6 comments

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.

ahmadalibaloch avatar Oct 26 '16 09:10 ahmadalibaloch

+1

vinzen avatar Nov 02 '16 16:11 vinzen

+1 I can't believe there isn't a collapse() and expand() method ...

icodeyou avatar Nov 13 '16 15:11 icodeyou

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.

icodeyou avatar Nov 13 '16 15:11 icodeyou

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 onCollapse and onExpand events.

More favorable solution is to make the FabMenu not block click events when collapsed, automatically, but do block when expanded.

ahmadalibaloch avatar Nov 14 '16 05:11 ahmadalibaloch

+1

dudadayan avatar Jan 09 '17 08:01 dudadayan

check the new close(boolean animated) method ; fabMenu.close(true) this should close the issue

wajdifadool avatar Jul 27 '18 22:07 wajdifadool