Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 337
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

ListView - Loading started

[ Edited ]

I have a ListView that I want to have an ActivityIndicator to show if there is a delay in retrieving data from a webservice. When the data is successfully retrieved, I want to stop the indicator. I have only seen examples in the ItemType function. I only have one itemType. Is there another way? The dataModel is a custom one.

 

        ListView {
            id: listView
            objectName: "listView"
            horizontalAlignment: HorizontalAlignment.Center
            dataModel: CourseSearchModel {
                id: courseSearchModel
            }

 

Developer
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: ListView - Loading started

I would just put another component on the screen and have it not be a part of the listview. In my opinion, only actual data should go in the list view unless theres a good reason why not :smileyhappy: . You can put it in a dock layout and have a reference to the indicator item that you can start and stop at the same time that you start and finish the data requests.
Like all of my posts
Developer
Posts: 337
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: ListView - Loading started

The ListView data source is in a C++ class. I am trying to put the ActivityIndicator on the QML and one it sees that the data source has loaded from the class, then it should stop the indicator. I haven't seen a signal that I could use in the ListView to tell me that it got the data.