Closed neroux closed 3 years ago
Hey @neroux,
If by 'manage options' you mean dynamically hide them at run time, then no, the library does not provide a single method call for that. If disabling a FabOption is not enough for you, you'll need to do something like call expandableFabLayout.removeAllViews()
then add in the views minus the options you want to remove using expandableFabLayout.addView()
or expandableFabLayout.addViews()
.
NOTE: 'removeAllViews' removes everything from portrait AND landscape orientation. This distinction only matters if you set unique ExpandableFabs to appear in separate orientations. If this is the case for you, you'll need to add back both your portrait and landscape ExpandableFabs, plus their respective FabOptions and Overlays.
Thanks for the clarification, I thought so. It would be lovely if the library offered that feature at some point in the future.
Hey @neroux,
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).
Hi Kelvin,
Is my impression wrong or is it currently not really supported to manage options dynamically in the code?
As mentioned in your example, I can use e.g. the following to enable/disable individual options upon a click
However using something like
hide()
orsetVisibility()
breaks the UI.