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 respons开发者_如何转开发ive 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.
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.
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);
}
});
精彩评论