I have a Box Y layout, containing lots of containers with a table layout each. In each table layout are various labels.
i update them in a background thread (data pulled from server), and do all the work wrapped in the below code. The problem is, sometimes my code is executed, and there is no change to the GUI. I have to drag the gui a bit, then suddely I see my updates. Other times, it partially updates the GUI, e.g. one containers items half have the old style, half have the new style, so it looks terrible. Is there something I can call to force the UI to update itself properly? The strange thing is that when I do the same things for other parts of the UI, it works without issue. I dont know if its just because I'm using table layouts?
Display.getInstance().callSerially(new Runnable() {
public void run() {
:
final Container c = (com.codename1.ui.Container) _uiBuilder.findByName("myContainer" + i, _mainContainer);
Label l = findMyLable(f);
l.setText("something");
System.out.println("I set the text to " + l.getText());
c.setUIID("someStyle");
:
}});
I the above example, I can see from the console output that the label was set, but often nothing changes in the GUI till I drag or scroll the container a bit. The GUI updates perhaps 1 in 4 iterations of the above code, often leaving half finished artifacts. This is on the simulator.