viewLifecycleOwner.lifecycleScope生命周期,kotlin
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.whenCreated {
Log.d(TAG,"onCreated")
}
viewLifecycleOwner.whenStarted {
Log.d(TAG,"onStarted")
}
viewLifecycleOwner.whenResumed {
Log.d(TAG,"onResume")
}
}