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
Robdob
Posts: 225
Registered: ‎01-31-2013
My Device: Developer
Accepted Solution

How/where do I display activity indicator when loading more records into listview

Hi,

 

I'm would like to display some sort of activityindicator when I'm loading more records into my list view..i.e when atEnd has been hit within ListView::smileysurprised:nScollingChanged().  My question is do I display the ActivityIndicator within the listview itself or do I display it wihtin the bottom of the container which holds the listview?

 

I'm sure there must be some standard way that people are going about displaying an indicator when addtional data is being retreived..

 

thanks,

 



GeoYeo - Free Local classifieds - Built for Blackberry 10, if you like it please Rate It and Share it!
Please use plain text.
Developer
Hithredin
Posts: 401
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: How/where do I display activity indicator when loading more records into listview

In the Blackberry World app in the category view:

- A view at the bottom of the list become visible, displaying a small LoadIndicator.

 

But I do not like it much because at the first load, the screen is just full black, and then all the data arrives at once. A big LoadIndicator at the center should have been added, like in the home screen.

But this way, we have two indicators to manage, which is uncool. So usually I prefer just one big centered indicator, which is shown behind the list when the "More" data is loading.

 

It's your call. But I'd like to listen to others choices.

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How/where do I display activity indicator when loading more records into listview

I think I would display it where users' eyes would be looking when the load button (or whatever) has been hit.

In some cases that would mean overlaid on top of the (presumably empty) list itself, and in other cases it would mean where the next items will appear once they're loaded.

I think this could be managed with a single indicator and some creative positioning, two avoid the admittedly "uncool" situation to which Hithredin refers. I'd try to make it a custom control that's designed to be associated with a ListView and which arranges to reposition the indicator as appropriate, based on the state of the ListView or its data model.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.