progess dialog

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

progess dialog

Postby nisha » Thu Apr 10, 2008 12:42 pm

Hi All,

I want the data in progress bar to change dynamic.... say if it is displaying "Doing Extreme Calculation",can i display "part 4 downloading from total 6 parts"? ... And this message will be dynamically changing.... Plz reply... :(


Regards,
nisha
nisha
Experienced Developer
Experienced Developer
 
Posts: 80
Joined: Fri Feb 15, 2008 7:52 am

Top

Postby living_sword » Thu Apr 10, 2008 4:53 pm

try this,

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.  
  3.  
  4. ProgressDialog pd = ProgressDialog.show(this, "Loading...", "Please wait", true,false);
  5.  
  6.  
  7.  
  8. Thread t = new Thread()
  9.  
  10. {
  11.  
  12.        public void run()
  13.  
  14.        {
  15.  
  16.               //do something
  17.  
  18.  
  19.  
  20.               pd.setTitle("Now this");
  21.  
  22.               pd.setMessage("Doing this");
  23.  
  24.  
  25.  
  26.  
  27.  
  28.               //do something more
  29.  
  30.        
  31.  
  32.               pd.setTitle("Now that");
  33.  
  34.               pd.setMessage("Doing that");
  35.  
  36.  
  37.  
  38.  
  39.  
  40.               //when done
  41.  
  42.              handler.sendEmptyMessage(0);
  43.  
  44.            
  45.  
  46.        }
  47.  
  48.  
  49.  
  50. };
  51.  
  52. t.start();
  53.  
  54.  
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Image
living_sword
Junior Developer
Junior Developer
 
Posts: 23
Joined: Fri Nov 23, 2007 4:44 am

Postby nisha » Mon Apr 14, 2008 6:33 am

hi ,


Thanks a lot... Its working perfectly...



Regards,
nisha :)
nisha
Experienced Developer
Experienced Developer
 
Posts: 80
Joined: Fri Feb 15, 2008 7:52 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests