Open ernazm opened 8 years ago
Would be nice to expose menuId to allow setting it with Databinding
How do you mean? Do you mean Databinding as in xml databinding?
... or to set it at runtime.
By design I wanted to keep the APIs of the lib as close as possible to those of the traditional menus. I see the current functionality of providing a pre-defined set of menu items via xml and modifying them at runtime isn't ideal. Perhaps binding data via an adapter would be a good option. What do you think about that?
That sounds like a big step. All I want for now is just be able to set
<io.github.yavski.fabspeeddial.FabSpeedDial
...
app:fabMenu='@{fabViewModel.fabMenuResource}'/>
where fabViewModel is
<data>
<variable
name="fabViewModel"
type="some.package.FabViewModel"/>
</data>
That requires menuId to be public or to have setter so I can write my @BindingAdapter. Currently I hacked this with reflection :)
Would be nice to expose menuId to allow setting it with Databinding, or to set it at runtime.