nambicompany / expandable-fab

A highly customizable 'speed dial' FloatingActionButton implementation.
https://nambicompany.github.io/expandable-fab/
MIT License
199 stars 20 forks source link

Hiding faboption #12

Closed lokhandeyogesh7 closed 3 years ago

lokhandeyogesh7 commented 3 years ago

How can I hide fab option on the basis of conditions?

kabumere commented 3 years ago

Hello @lokhandeyogesh7,

Only the ExpandableFab itself can be completely hidden. FabOptions can only be disabled as of now (meaning the colors of the button and text will change to gray, and they will be unclickable by the users).

For now, if you want to actually hide a FabOption (so it's gone completely and doesn't take up space in the list) you must call expandableFabLayout.removeAllViews(), then add in the original FabOptions (minus the FabOption you want to hide) using expandableFabLayout.addView() or expandableFabLayout.addViews().

kabumere commented 3 years ago

Hey @lokhandeyogesh7, did the above help you?

lokhandeyogesh7 commented 3 years ago

Yes, I am closing the issue.

kabumere commented 3 years ago

Hey @lokhandeyogesh7,

Good news, the feature you requested has been added to the library! Please use version v1.1.1 now available on Maven Central to access the dynamic FabOption removal feature (or clone the latest changes from the master branch on this repo).

dharamveer-roundr commented 2 years ago

Hi,

How can prevent expanding Faboption based on condition?

and

When clicked on eFab then do some other action instead of Expanding

kabumere commented 2 years ago

Hey @dharamveer-roundr,

Please open up a new ticket so that I can help you. When creating the ticket, please describe a little more exactly what you're trying to accomplish (so that I can better understand when helping you).