×

Discussion Board

Results 1 to 6 of 6

Thread: Progress bar???

  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Progress bar???

    Hi,
    Please help me with it.i am stuck to this problem of mine.
    I want to know how we are able to implements a process bar in j2me.
    I want to show when we click on the button it will show that progress bar until we get the response from the server through internet.
    Please any body help me or give me source code for that . i am not able to do that..
    Please help me...
    It will be realyy very helpful.


    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Progress bar???

    Quote Originally Posted by yatibawri View Post
    Hi,
    Please help me with it.i am stuck to this problem of mine.
    I want to know how we are able to implements a process bar in j2me.
    I want to show when we click on the button it will show that progress bar until we get the response from the server through internet.
    Please any body help me or give me source code for that . i am not able to do that..
    Please help me...
    It will be realyy very helpful.


    Thanks

    You can make a progress bar on customItem or directly on Canvas.
    Refer to this code example at http://lwuit.blogspot.com/2008/05/pr...-in-lwuit.html
    You will get the idea how to paint the progress bar on the screen within CustomItem or Canvas.

    Now who to update the progress on it --
    Read your server response in chunks, and you if you know the total response length - you can update the progress on the UI after every chunk read from the response.
    Thanks,
    Ekta

  3. #3
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: Progress bar???

    Thanks for your reply.
    I am trying to do it in a form is it possible to do so without using canvas.
    i want to download the data so i dnt knw the length.

    I want to increment the progress bar as data is downloaded so how can i do so please help me with it.

    Thanks

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Progress bar???

    Quote Originally Posted by yatibawri View Post
    Thanks for your reply.
    I am trying to do it in a form is it possible to do so without using canvas.
    i want to download the data so i dnt knw the length.

    I want to increment the progress bar as data is downloaded so how can i do so please help me with it.

    Thanks
    On the form - you can create a CustomItem - in paint() method do the same thing as we do on Canvas (ref. to URL I gave before)
    Ask the server side team to provide you content length in the response headers, else if you don't know complete length of the response - you cannot show actual progress bar.

    For dummy progress bar - use an animated gif - or a animated sand clock - its the only solution possible if content length of the response is unknow.
    Thanks,
    Ekta

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Progress bar???

    You might use a Gauge instead ? especially if you don't know how much you are gonna download you could us an infinite Gauge...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  6. #6
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Progress bar???

    As Tiger Suggested, if you want to do it on form w/o custom Item and you don't know the response length also then - CONTINUOUS_RUNNING Gauge will be the best option for you - Just to add to what he wrote -
    as per the API doc -
    "if the application is performing an operation but has no means of detecting progress, it should set a non-interactive Gauge to have indefinite range and set its value to CONTINUOUS_RUNNING or CONTINUOUS_IDLE as appropriate. For example, if the application has issued a request to a network server and is about to block waiting for the server to respond, it should set the Gauge's state to CONTINUOUS_RUNNING before awaiting the response, and it should set the state to CONTINUOUS_IDLE after it has received the response."
    Thanks,
    Ekta

Similar Threads

  1. progress bar help
    By thelegendofzaku in forum Mobile Java Games
    Replies: 1
    Last Post: 2009-12-28, 18:48
  2. progress bar and progress in %
    By manmay.gupta in forum Symbian User Interface
    Replies: 14
    Last Post: 2009-09-23, 11:01
  3. Progress Bar
    By coxcom in forum Symbian
    Replies: 0
    Last Post: 2006-05-05, 14:54
  4. about the progress bar???
    By ipis in forum Symbian
    Replies: 4
    Last Post: 2005-11-09, 09:29
  5. Using a progress bar ?
    By nlecomte in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-05-27, 10:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×