public void start() { if(current != null){ current.show(); return; } screenOne(); } private void screenOne() { Form f = new Form(new BoxLayout(BoxLayout.Y_AXIS)); Label lbl = new Label(); Label lbl2 = new Label(); FontImage.setMaterialIcon(lbl, FontImage.MATERIAL_ALARM_ON, 20); FontImage.setMaterialIcon(lbl2, FontImage.MATERIAL_ALARM_OFF, 20); Container contLabels = new Container(new FlowLayout(Component.CENTER)); contLabels.add(lbl); Button btnFlip = new Button("FILP"); f.addAll(contLabels, btnFlip); Label[] next = {lbl2}; btnFlip.addActionListener((evt) -> { contLabels.replace(contLabels.getComponentAt(0), next[0], new FlipTransition()); next[0] = (Label) contLabels.getComponentAt(0); }); f.show(); }
I've tried on version 3.7 and it works, so it seems to be a recent regression.
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/ba5d1ce5-7d83-4cc2-88a4-3a322a859b0e%40googlegroups.com.