• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Real time progress bar

 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello! i m trying to make a real time progress bar, by that you guys must understood that i want the bar to load as the activity i am waiting for is loadign itself. Please help.
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone please help me?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18153
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't thing the standard J2ME widget toolset includes a progress bar, although maybe a third-party package like Polish might.

If you don't have a progress control, you can always do it the old-fashioned way. Draw a rectangle to hold the bar, draw another rectangle to show percent complete, where the width of this inner rectangle is W*(pct/100), where W is the width of the outer rectangle, and "pct" is the (integral) percent figure, as in "50" for 50%.
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for the answer, but i ment to say another thing. i know how to do it regarding the graphic part. the problem is:
i have this midlet which is about 200kb and the user needs to wait a while until the midlet is loading so i lunch first this waiting screen with progress bar, the progres bar must represent the loading progress in real time, until my main screen is loaded. i want to represent the real progress, not a imaginary progress
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, your application/MIDlet can't show a Gauge or other kind of progress bar while it is itself loading, it has to be already loaded and running for that.

For examples of the principles behind animation during long running tasks, see these two pages:
Networking, User Experience, and Threads
Using Threads in J2ME Applications
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, but if i want to display a screen that takes time, what then?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic