Yes, your solution fixes the animation, but I still think there is a
problem. This new code still fails:
Form hi = new Form("Tabs", new BorderLayout());
Tabs t = new Tabs();
SpanLabel t1 = new SpanLabel("Blue");
t1.getAllStyles().setBgColor(0xff);
t1.getAllStyles().setBgTransparency(255);
Container cont1 = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cont1.add(t1);
SpanLabel t2 = new SpanLabel("Green");
t2.getAllStyles().setBgColor(0xff00);
t2.getAllStyles().setBgTransparency(255);
Container cont2 = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cont2.add(t2);
SpanLabel t3 = new SpanLabel("Red");
t3.getAllStyles().setBgColor(0xff0000);
t3.getAllStyles().setBgTransparency(255);
Container cont3 = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cont3.add(t3);
t.addTab("Blue", cont1);
t.addTab("Green", cont2);
t.addTab("Red", cont3);
UITimer.timer(500, true, hi, () -> {
int idx = t.getSelectedIndex() + 1;
if(idx >= t.getTabCount()) {
idx = 0;
}
t.setSelectedIndex(idx, true);
});
hi.add(CENTER, t);
hi.show();
If you use TextArea instead of SpanLabel, the animation works again, so
it's not a big problem for me because I can style TextArea and make it
work. But the issue is there, and it wasn't before.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/3b868356-dc0e-4a60-8526-12d0445e0fed%40googlegroups.com.