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

Adobe AIR Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 43
Registered: ‎11-17-2010
My Device: Not Specified

How to figure out when list is fully loaded

Hi everyone!

 

An app I am working on is almost complete, however there is some fine tuning involved and I've run into a slight problem with one of the issues. I have a progress indicator that shows up while lists are being populated with items. Items populating the lists are dynamic and I am making a service call to get these items. In some cases there are quite a few items within the list and loading them takes a while. The list stays blanks while these items are being populated.

 

Now the problem is that the progress indicator goes away as soon as the list component is loaded in the view, even though it hasn't finished populating with list items. I want it to work so that the indicator only goes away once all items have been filled within the list. Is there any way I can achieve this or check for this using an event?

 

Any help or guidance is appreciated.

 

Thanks!

 

 

Developer
Posts: 327
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition
My Carrier: Rogers

Re: How to figure out when list is fully loaded

[ Edited ]

the way I populate my lists is by doing an HTTPRequest to an array, have the array as a dataprovider, then remove/add the list that has already been added with the new dataprovider....

 

so basically, when the app is first loaded, I addchild the list with whatever content i have for it, then when I Hit the button to call the HTTPRequest, I take that data, throw it in an array, and then remove the original list and add the new one.

 

**And I use an Activity indicator as well for this....I start the activity indicator when the app first loads it data, then end it as soon as the list has been added (which is of course after the data has been populated into the array and used as a dataprovider), and start it whenever the button is pressed again...and end when done and so on...

CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting
Highlighted
Contributor
Posts: 43
Registered: ‎11-17-2010
My Device: Not Specified

Re: How to figure out when list is fully loaded

Hmm that is a nice way to do it....I think this might help me and will be a good work around.

 

Thanks so much!