forked from deveshp007/Android-App-Development
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathP6.kt
43 lines (34 loc) · 975 Bytes
/
P6.kt
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
package com.example.myapplication
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
class Lifecycle : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_lifecycle)
}
override fun onPause() {
super.onPause()
Log.d("Lifecycle","onPause invoked")
}
override fun onStart() {
super.onStart()
Log.d("Lifecycle","onStart invoked")
}
override fun onStop() {
super.onStop()
Log.d("Lifecycle","onStop invoked")
}
override fun onDestroy() {
super.onDestroy()
Log.d("Lifecycle","onDestroy invoked")
}
override fun onResume() {
super.onResume()
Log.d("Lifecycle","onResume invoked")
}
override fun onRestart() {
super.onRestart()
Log.d("Lifecycle","onRestart invoked")
}
}