Thanks for reply fadden.. Is there any replacement for threads..or else I will have to change my logic as u described..
On Jan 31, 7:20 am, fadden <fad...@android.com> wrote: > On Jan 30, 6:30 am, Sagar Parmar <sagar.india...@gmail.com> wrote: > > > I am using Thread to display animation..I create a new thread whenever user > > preference is changed.Now I want to Remove the previous thread from Dalvik > > VM so that my application does not crash..How can I remove Thread from DVM?? > > I use Thread.stop() but it is not working..Please help.. > > Killing one thread from another is dangerous, because you don't know > what resources are being held by the target thread. The Thread > methods for doing this are deprecated, and have not been implemented > in Dalvik. > > The thread should check a variable periodically to see if it should > continue running. In many situations you'll want to declare the > variable "volatile". --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---