hi, as per mark told you use the finish() method to end the activity. when you finish() the activity the onDestroy() will get called.
I hope your don the onCreat() and OnDestroy() methods well. On Apr 8, 8:39 am, Rohit Kundalkar <rohit.kundal...@gmail.com> wrote: > @Override > public void onDestroy() { > super.onDestroy(); > try{ > > } > catch(Exception ex){} > > } > > write this in onCreate() method in calculator activity. > Do all the finishing stuff in try{} > > On Wed, Apr 8, 2009 at 5:31 AM, Meryl Silverburgh < > > silverburgh.me...@gmail.com> wrote: > > > Hi, > > > how can I destroy an Activity in android? > > e.g. if i launch the 'Calculator' Activity, how to destroy it so that > > the onDestroy method will get called? > > > Thank you. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---