1 public class MainActivity extends Activity {
 2     
 3     private static final String TAG ="MainActivity";
 4 
 5     @Override
 6     protected void onCreate(Bundle savedInstanceState) {
 7 
 8         super.onCreate(savedInstanceState);
 9         setContentView(R.layout.activity_main);
10         Log.d(TAG, "onCreate");
11     }
12 
13     @Override
14     protected void onStart() {
15 
16         super.onStart();
17         Log.d(TAG, "onStart");
18     }
19 
20     @Override
21     protected void onRestart() {
22 
23         super.onRestart();
24         Log.d(TAG, "onRestart");
25     }
26 
27     @Override
28     protected void onResume() {
29 
30         super.onResume();
31         Log.d(TAG, "onResume");
32     }
33 
34     @Override
35     protected void onPause() {
36 
37         super.onPause();
38         Log.d(TAG, "onPause");
39     }
40 
41     @Override
42     protected void onStop() {
43 
44         super.onStop();
45         Log.d(TAG, "onStop");
46     }
47 
48     @Override
49     protected void onDestroy() {
50 
51         super.onDestroy();
52         Log.d(TAG, "onDestroy");
53     }
54 
55     @Override
56     public void onConfigurationChanged(Configuration newConfig) {
57 
58         super.onConfigurationChanged(newConfig);
59         Log.d(TAG, "onConfigurationChanged");
60     }
View Code

相关文章:

  • 2021-06-27
  • 2022-12-23
  • 2021-06-18
  • 2021-06-11
  • 2022-01-04
  • 2021-09-19
  • 2022-02-09
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2022-02-10
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案