I just followed what Dan U said in the link Mihai provide...
(http://groups.google.com/group/android-developers/browse_thread/
thread/9c90e97c5a907d87/bb9974a4b168057c?hl=en&lnk=gst&q=Progress
+dialog+dismiss()+method)
Here is my progress bar:
lProgressBar = ProgressDialog.show(Updt.this,
"Please wait...",
"...while connecting to
database", true, false);
new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(3000);
} catch (Exception ex) {
}
lProgressBar.dismiss();
\\my code !!!!
Looper.prepare();
if (ok) {
showAlert("done", 0,
"Good ", "Ok", true);
} else {
showAlert("Error", 0,
"wrong", "Ok",
true);
}
// in order to display alert
dialog we have to call
// Looper.loop()
Looper.loop();
// after Looper.loop() we have
to call quit() on our
// looper
Looper.myLooper().quit();
}
}).start();
On Apr 10, 7:52 pm, zero <[EMAIL PROTECTED]> wrote:
> could you please share how you resolved this?
>
> On Mar 8, 9:46 am, "Yassine" <[EMAIL PROTECTED]> wrote:
>
> > Thanks, sorted out ;)
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mihai Fonoage
> > Sent: Friday, March 07, 2008 8:16 PM
> > To: Android Developers
> > Subject: [android-developers] Re: Re : [android-developers] Re: progress bar
>
> > Hi Yassine,
>
> > Read this previous
> > thread:http://groups.google.com/group/android-developers/browse_thread/threa...
> > 97c5a907d87/bb9974a4b168057c?hl=en&lnk=gst&q=Progress+dialog+dismiss()+metho
> > d
>
> > Mihai Fonoage
>
> > On Mar 7, 6:35 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > > I'm using that code:
>
> > > ProgressDialog pg = ProgressDialog.show(UpdateContact.this,
>
> > > null,"Please wait while loading...",true,true);
>
> > > i did tried pg.dismiss(), it gave me some error like
>
> > > [EMAIL PROTECTED] must be attached to a
> > window
>
> > > I tried to attach it, but i can't... how shall i do it ?Envoyé avecYahoo!
> > Mail.
> > > Une boite mail plus intelligente.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---