Floating Action button in android is good option. I want this in my codenameone application. I have tried it by using LayeredLayout, by having two layouts. I'm unable to achieve it perfectly. The button is keep moving along with the scroll. how to fix the button to the right bottom of the screen without affecting when the background layer is scrolling.
Here is how i tried.
Form myForm = new Form();
myForm.setLayout(new LayeredLayout());
myForm.setTitle("Floating Action Button");
SpanLabel lbl = new SpanLabel("some long text");
Container conBottom = new Container();
conBottom.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
conBottom.addComponent(lbl);
FlowLayout flow = new FlowLayout(Component.RIGHT);
flow.setValign(Component.BOTTOM);
Container conUpper = new Container(flow);
conUpper.addComponent(new Button("+"));
conUpper.setScrollable(false);
myForm.addComponent(conBottom);
myForm.addComponent(conUpper);
myForm.show();
Here is the link similar to what i want to achieve. https://github.com/Clans/FloatingActionButton Please Help! Thanks!