I've recently upgrade Gluon from 3.0.0 to 4.0.1. This code now refuses to compile:
addViewFactory(SECONDARY_VIEW, () -> {
FloatingActionButton fab = new FloatingActionButton(MaterialDesignIcon.CLOSE.text, e -> {
ViewTest.getInstance().switchView(ViewTest.PRIMARY_VIEW);
});
final Button button = new Button("Click");
button.setOnAction(e -> fab.setFloatingActionButtonHandler(FloatingActionButton.BOTTOM_LEFT));
View view = new View("Name") {
{
getLayers().add(fab);
}
@Override
protected void updateAppBar(AppBar appBar) {
appBar.setTitleText("FloatingActionButton");
}
};
return view;
});
The JavaDoc doesn't seem to have changed, but building with 4.0.1 yields this error for getLayers().add(fab):
"The method add(Layer) in the type List is not applicable for the arguments (FloatingActionButton)"
I created two separate projects to test using 3.0.0 and 4.0.1 to verify. I can't really go back to 3.0.0 at this point.
Thanks.