0

I am trying to add a progress indicator (clock style or hour glass, depending on the user's BB theme) to an element on the main screen of my application.

In short, my application has a field at the bottom of the screen that will display a rotating list of items parsed from an XML file.

I have moved the downloading and parsing operation to the background so the application remains responsive while the XML data is being retrieved. Now I would like to add an above mentioned progress indicator.

So far, I have only found pages that describe a progress bar, which is not what I want, or displaying wait screens that would lock the application during the parsing process.

If someone could point me in the right direction, thanks.

Mike D
  • 4,938
  • 6
  • 43
  • 99
  • what OS version are you working on? – 8vius Aug 15 '11 at 20:39
  • have you checked the http://stackoverflow.com/questions/5003386/how-to-display-progress-bar-in-blackberry/5013900#5013900 ? – Vit Khudenko Aug 15 '11 at 20:46
  • @8vius I am working BB OS 5. – Mike D Aug 15 '11 at 20:47
  • @Arhimed Those look like they would put a pop dialog over the main screen, blocking user input. I am trying to aim for allowing user interaction while showing the a progress indicator in another child element of the main screen. – Mike D Aug 15 '11 at 20:52
  • 1
    I believe your solution might have to be developed by yourself, using what Arhimed and myself have provided, you can use the example to just create a field on your screen that's a gif which you can maintain spinning and remove it when the execution of your code completes, for instance. – 8vius Aug 15 '11 at 21:10

2 Answers2

1

If you are working in OS 6 this might be of use:

http://docs.blackberry.com/en/developers/deliverables/18125/Progress_indicator_1214566_11.jsp

This is a solution I implemented in my own project:

http://supportforums.blackberry.com/t5/Java-Development/Progress-Bar/m-p/588505#M121376

I would suggest (from experience) to stick to the BB forums for BB questions, Stack Overflow is not a very good place to search from BB knowledge considering it isn't THAT widespread and popular.

8vius
  • 5,786
  • 14
  • 74
  • 136
  • I know, but I still find questions get answered more quickly here. – Mike D Aug 15 '11 at 20:48
  • Yeah it happens somewhat, with some questions, it's still horrible T_T. Sometimes I had to wait a couple of weeks before I even got a comment on my question – 8vius Aug 15 '11 at 20:49
  • The link to the 2nd solution (the one I used myself) is the one you should heck btw since the first one won't work in OS 5 – 8vius Aug 15 '11 at 20:50
1

Try this link http://www.naviina.eu/wp/blackberry/loading-class-for-blackberry/

and also use

synchronized (UiApplication.getEventLock()) {
    UiApplication.getUiApplication().invokeLater(new Runnable() {                       
    public void run() {                             
        setShowLoader(false);
   }
});
Gilles 'SO- stop being evil'
  • 104,111
  • 38
  • 209
  • 254
Jisson
  • 3,566
  • 8
  • 38
  • 71