Activity Lifecycle Owner
class ActivityLifecycleOwner(targetActivity: Activity) : ActivityLifecycleCallbacksImpl, LifecycleOwner
Content copied to clipboard
将Activity(非ComponentActivity)转换,使其获取Lifecycle 利用ActivityLifecycleCallbacks 检测对应的生命周期,来自行实现 Lifecycle
Constructors
ActivityLifecycleOwner
Link copied to clipboard
Functions
getLifecycle
Link copied to clipboard
handleLifecycleEvent
Link copied to clipboard
private fun handleLifecycleEvent(activity: Activity, event: Lifecycle.Event)
Content copied to clipboard
onActivityCreated
Link copied to clipboard
open override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?)
Content copied to clipboard
onActivityDestroyed
Link copied to clipboard
onActivityPaused
Link copied to clipboard
onActivityPostCreated
Link copied to clipboard
onActivityPostDestroyed
Link copied to clipboard
onActivityPostPaused
Link copied to clipboard
onActivityPostResumed
Link copied to clipboard
onActivityPostSaveInstanceState
Link copied to clipboard
onActivityPostStarted
Link copied to clipboard
onActivityPostStopped
Link copied to clipboard
onActivityPreCreated
Link copied to clipboard
onActivityPreDestroyed
Link copied to clipboard
onActivityPrePaused
Link copied to clipboard
onActivityPreResumed
Link copied to clipboard
onActivityPreSaveInstanceState
Link copied to clipboard
onActivityPreStarted
Link copied to clipboard
onActivityPreStopped
Link copied to clipboard
onActivityResumed
Link copied to clipboard
onActivitySaveInstanceState
Link copied to clipboard
open override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle)
Content copied to clipboard
onActivityStarted
Link copied to clipboard
onActivityStopped
Link copied to clipboard