BlackBerry dynamically updates ListField

Is it possible to dynamically update the BlackBerry ListField ?

First I created a list with 10 objects, the background service runs in the background to collect objects, after a while I got a few more objects, I want to add these new objects to the existing ListField without restarting MainScreen.

+4
source share
2 answers

Yes, it should be possible - add objects to your data structure (for example, Vector), and then call:

 UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { myList.setSize(myVector.size()); myList.invalidate(); } }); 
+5
source

Yes. You modify the backup storage update where you have the values ​​displayed in the list, and then call one of the setSize methods on your ListField.

+3
source

All Articles