-
-
Save ahmedmtaher/fa5e124ddfce19cd3a71eb26754b3ca4 to your computer and use it in GitHub Desktop.
Activity Lifecycle exercise
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
package com.example.android.lifecycle; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Log.v("MainActivity", "onCreate"); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
Log.v("MainActivity", "onStart"); | |
} | |
@Override | |
protected void onResume() { | |
super.onResume(); | |
Log.v("MainActivity", "onResume"); | |
} | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
Log.v("MainActivity", "onPause"); | |
} | |
@Override | |
protected void onStop() { | |
super.onStop(); | |
Log.v("MainActivity", "onStop"); | |
} | |
@Override | |
protected void onDestroy() { | |
super.onDestroy(); | |
Log.v("MainActivity", "onDestroy"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment