Created
March 5, 2018 06:52
-
-
Save AasemJS/0b8a5949942eb4e60db969110b112658 to your computer and use it in GitHub Desktop.
Activity Lifecycle
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
import android.os.PersistableBundle; | |
import android.support.annotation.Nullable; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Log.i("Log STATUS","ACTIVITY CREATED"); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
Log.i("LOG STATUS","ACTIVITY STARTED"); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
Log.i("LOG STATUS","ACTIVITY RESUMED"); | |
} | |
@Override | |
protected void onRestart() { | |
super.onRestart(); | |
Log.i("LOG STATUS","ACTIVITY RE-STARTED"); | |
} | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
Log.i("LOG STATUS","ACTIVITY PAUSED"); | |
} | |
@Override | |
protected void onStop() { | |
super.onStop(); | |
Log.i("LOG STATUS","ACTIVITY STOPPED"); | |
} | |
@Override | |
protected void onDestroy() { | |
super.onDestroy(); | |
Log.i("LOG STATUS","ACTIVITY DESTROYED"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment