Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BlackBerry dynamically updating ListField

Tags:

blackberry

Is it possible to update BlackBerry ListField dynamically?

First I have created a listview with 10 objects, a background service is running in the background to collect the objects, after a while I got few more objects, I want to add these new objects to already existing ListField without reloading the MainScreen.

like image 260
evan Avatar asked Feb 25 '23 03:02

evan


1 Answers

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

UiApplication.getUiApplication().invokeLater(new Runnable() {
    public void run() {
        myList.setSize(myVector.size());
        myList.invalidate();
    }
});
like image 65
Alexander Farber Avatar answered Feb 26 '23 18:02

Alexander Farber