-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathactivities_life_cycle.java
More file actions
56 lines (44 loc) · 1.17 KB
/
activities_life_cycle.java
File metadata and controls
56 lines (44 loc) · 1.17 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
package com.example.app_example;
import android.content.Intent;
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(0);
}
@Override
protected void onPause() {
super.onPause();
Log.i("Life cycle:", "onPause ...");
}
@Override
protected void onStop() {
super.onStop();
Log.i("Life cycle:", "onStop ...");
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.i("Life cycle:", "onDestroy ...");
}
@Override
protected void onResume() {
super.onResume();
Log.i("Life cycle:", "onResume ...");
}
@Override
protected void onStart() {
super.onStart();
Log.i("Life cycle:", "onStart ...");
}
@Override
protected void onRestart() {
super.onRestart();
Log.i("Life cycle:", "onRestart ...");
}
}