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

Java Development

Reply
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified
Accepted Solution

Use scrollbar when data is load?

problem.pngNow i have a problem, i don't know how to use scrollbar when data is load(load by url)

You can see the picture for more detail. I want to load image but when program load image user can user scrollbar to choose photoshow on the right screen. Absolutely the image is represent for each photoshow, we can call it as thumbnail so when scrollbar move i must calculate what thumbnail is loaded. But i will solve that problem later after resolve this problem.

 

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

Use 2 thread can resolve my problem?

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

Please help!!!
Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Use scrollbar when data is load?

Sorry, I don't see a picture using IE 8 and I don't understand your description either.

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

Sr! You can see picture in this link original.png_thumb.jpg . Don't worry this link is fresh and safe! :smileyvery-happy:

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

Sr in my description have one mistake. Exactly is " When program load thumbnail user cannot use scrollbar to choose photoshow on the right screen, i mean make scroll down or up  follow VerticalFieldManager.ScrollBar"

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

Someone know this problem can send me a link about code or suggest?

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Use scrollbar when data is load?

Sorry, I really don't understand what you are asking. 

 

You seem to try to describe your problem in one big long sentence.  Instead, can describe it by telling us what the user will see and do, in small steps. 

 

For example:

Step 1, display a list.  Each item on the list has a thumbnail and...

Step 2.  If thumbnail has not been downloaded .....

Step 3.  If entry is selected, then ....

 

The clearer you can describe this, the easier it for us to answer the question.

Please use plain text.
New Developer
phucnhfpt
Posts: 119
Registered: ‎10-23-2009
My Device: Not Specified

Re: Use scrollbar when data is load?

[ Edited ]

Sr !

 

First, my program display many shows, each show have a thumbnail. The shows is displayed as listview, each row of list includes thumbnail and name of show.(done)

 

Second the thumbnail is load by url, if it is not exist or download not success, program will display a common picture. When user go to the screen, first they can see only this picture. After that program will load thumbnail and replace.

 

The thumbnail is display only, so it user choose a show by press enter or scroll a new screen will display(done)

 

And now, my problem is when program load thumbnail by url, i use a thread for download. But when program load thumbnail, user can make scroll down or up, or do something... And if user move scroll, they must wait program load thumbnail success, then they can see the show. I think it is not good. My reach is want to scroll moving and load thumbnail action individual. I try to use two thread : a thread to create object and add to screen, another thread uses for load thumbnail. But not success. 

 

I hope my description is enough detail for you.

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,603
Registered: ‎07-14-2008
My Device: Not Specified

Re: Use scrollbar when data is load?

So we have a number of rows, each row has a picture and a name.

 

To make it easier to understand, let us say that your list is a list of Shows   By this I assume you mean things like "Cats", or "Macbeth" or "Rolling Stones in concert".  For each Show you want to display a picture and a name.

 

To get the picture, you need to download it from some Web Server.  if the Show does not have a picture, then you should display a dummy (place holder) picture. 

 

I imagine you would do this as follows:  You have an Object for each Show, your network thread downloads the picture and stores it in the Show Object for the associated show.  By default all the Show will have the common picture.  So this Thread will run in the background, going down the list of Shows you have on the device, and for each show that does not have a picture, it will download the correct picture.  If this network Thread is correctly set up, it will work away in the background and the scrolling and display will not be effected by its working.

 

Note that you should not start a Thread for each Show that does not have a picture.

 

Your problem seems to be that the download processing is stopping the scrolling.  This indicates that you have coded the download processing incorrectly and it is running on the Event Thread.  Make sure that your network processing really is all in the Background. 

 

Have I understood clearly?

Please use plain text.