1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package com.suyghur.dolin.simple
- import androidx.lifecycle.Lifecycle
- import androidx.lifecycle.LifecycleObserver
- import androidx.lifecycle.OnLifecycleEvent
- import com.suyghur.dolin.zap.Zap
- /**
- * @author #Suyghur.
- * Created on 4/8/21
- */
- class MyLifecycleObserver : LifecycleObserver {
- @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
- fun onCreate() {
- Zap.d("Application onCreate")
- }
- @OnLifecycleEvent(Lifecycle.Event.ON_START)
- fun onStart() {
- Zap.d("Application onStart")
- }
- @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
- fun onResume() {
- Zap.d("Application onResume")
- }
- @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
- fun onPause() {
- Zap.d("Application onPause")
- }
- @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
- fun onStop() {
- Zap.d("Application onStop")
- }
- @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
- fun onDestroy() {
- Zap.d("Application onDestroy")
- }
- }
|