Created
August 7, 2014 22:17
-
-
Save phyous/0cd35151f0ba91254b73 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
public class MyActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_my); | |
Log.i("MyActivity", "Activity Launched!"); | |
Log.i("MyActivity", "onCreate()"); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
Log.i("MyActivity", "Activity visible, not in foreground"); | |
Log.i("MyActivity", "onStart()"); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
Log.i("MyActivity", "Activity visible, now in foreground"); | |
Log.i("MyActivity", "onResume()"); | |
} | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
Log.i("MyActivity", "Activity visible, not in foreground"); | |
Log.i("MyActivity", "onPause()"); | |
} | |
@Override | |
protected void onStop() { | |
super.onStop(); | |
Log.i("MyActivity", "Activity no longer visible"); | |
Log.i("MyActivity", "onStop()"); | |
} | |
@Override | |
protected void onDestroy() { | |
super.onDestroy(); | |
Log.i("MyActivity", "Activity finished & destroyed"); | |
Log.i("MyActivity", "onDestroy()"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment