forked from vedharaju/6.570ExampleApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLifecycleActivity.java
More file actions
61 lines (47 loc) · 1.2 KB
/
LifecycleActivity.java
File metadata and controls
61 lines (47 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.vedha.sampleapp;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class LifecycleActivity extends Activity {
private static final String TAG = "LifecylceActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
// Always call the superclass
super.onCreate(savedInstanceState);
Log.v(TAG, "onCreate");
// Set the user interface layout for this Activity
// The layout file is defined in the project
// res/layout/activity_lifecycle.xml file
setContentView(R.layout.activity_lifecycle);
}
@Override
public void onStart() {
// Always call the superclass
super.onStart();
Log.v(TAG, "onStart");
}
@Override
public void onResume() {
// Always call the superclass
super.onResume();
Log.v(TAG, "onResume");
}
@Override
public void onPause() {
// Always call the superclass
super.onPause();
Log.v(TAG, "onPause");
}
@Override
public void onStop() {
// Always call the superclass
super.onStop();
Log.v(TAG, "onStop");
}
@Override
public void onDestroy() {
// Always call the superclass
super.onDestroy();
Log.v(TAG, "onDestroy");
}
}