i am developing one application in blackberry java development. I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen.
Could you tell me how can i do that....
Regards Pankaj Pareek
Do one thing.... At the listner event of button write this.
Basically you need to start the network request in a background thread. Once the network operation is complete you should notify the main/UI thread to change the waiting screen into the results.
To notify the main thread have a look at the link below and search for
invokeLater
:http://developers.sun.com/mobility/midp/articles/blackberrydev/
Word of advice: Don't spawn to many threads at once on mobile devices. Usually they have a really low maximum number of threads.
It's already here:
Stackoverflow - Blackberry - Loading screen with animation
Stackoverflow - Blackberry - Application loading screen
I created a custom animated bitmap field, like this:
//thread class
}
call from : //loading