What's the instance of the analyzeThread? You should definitely stop/kill/cancel the previous one. Look at the API doc for the type which the analyzeThread type and you'll find it how to kill it
On Sep 24, 9:48 pm, Hudar <hudars...@gmail.com> wrote: > Hi, > > I did quite a simple app using android thread to implement progress > dialog. The app work this way : > When we click on button, it will start separate thread and analyze > something on the thread while keep updating the progress dialog. It > was running fine till the thread finished. > > But after finished, when I click on the button again, it should > analyze again, but what happen was it show progress dialog already at > 100% and stuck there, instead of reanalyze and start progress dialog > at 0%. > > I am wondering that this is caused by prev thread that still on > memory. How we destroy that thread? I did assign null to the thread > before start new one. Some thing like this : > > public onclick(){ > analyzeThread = null; > analyzeTrhead.start(); > > } > > Hope anybody could advice. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en