java - ProgressDialog Problem? -


there progressdialog in app. running after finishing process not close. error, i'm doing. thanks.

 button.setonclicklistener(new view.onclicklistener()      {              public void onclick(view v) {                              progressdialog.show();                   new thread(new runnable() {                         public void run() {                             try {                                                              // doing something...                                    progressdialog.dismiss();                              } catch (exception e) {                                 e.printstacktrace();                             }                          }                     }).start();                      }                       }); 

do this......

button.setonclicklistener(new view.onclicklistener()      {              public void onclick(view v) {                              progressdialog.show();                   new thread(new runnable() {                         public void run() {                             try {                                                              // doing something...                                   hm.sendemptymessage(0);                              } catch (exception e) {                                 e.printstacktrace();                             }                          }                     }).start();                      }                       });       handler hm = new handler()     {        public void handlemessage(message msg)        {           progressdialog.dismiss();         }       } 

thanks.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -