Wednesday 15 September 2010

android - OnDestroy is not being called after the back button is press -


I am trying to clean the code on my function, the function to create is called, but brake pointon I set on OnDestoy never goes when the back button is pressed

Code:

  Expands public class cPuzzle CBS {cPuzzleView MyView; Crate on Public Zero (Bundle Saved Instantstate) {Super. Secret (Saved Instantstate); SetContentView (R.layout.activity_main); Try {MyView = new cPuzzleView (this, it, cGlobals.PuzleId); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); } SetContentView (MyView); StartTimer (20); } Zero OnDestroy () {StopTimer (); MyView.OnDestroy (); }    

Your onDestroy should be defined

and not

  zero OnDestroy () {...}   

Java is case-sensitive language.

No comments:

Post a Comment