Created
June 24, 2015 03:40
-
-
Save klanjabrik/3bddceadfe8367a1a804 to your computer and use it in GitHub Desktop.
AndroidLifeCycleEvents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AndroidLifeCycle extends Activity { | |
String tag = "AndroidLifeCycleEvents"; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
Log.d(tag, "In the onCreate() event"); | |
} | |
public void onStart() | |
{ | |
super.onStart(); | |
Log.d(tag, "In the onStart() event"); | |
} | |
public void onRestart() | |
{ | |
super.onRestart(); | |
Log.d(tag, "In the onRestart() event"); | |
} | |
public void onResume() | |
{ | |
super.onResume(); | |
Log.d(tag, "In the onResume() event"); | |
} | |
public void onPause() | |
{ | |
super.onPause(); | |
Log.d(tag, "In the onPause() event"); | |
} | |
public void onStop() | |
{ | |
super.onStop(); | |
Log.d(tag, "In the onStop() event"); | |
} | |
public void onDestroy() | |
{ | |
super.onDestroy(); | |
Log.d(tag, "In the onDestroy() event"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment