onDestroy

abstract fun onDestroy(lifecycleOwner: LifecycleOwner)

Called when the LifecycleOwner is being destroyed. This method is invoked once for a given LifecycleOwner. After this method is called, the LifecycleOwner is considered destroyed and will not receive any more lifecycle events.

Parameters

lifecycleOwner

The LifecycleOwner whose lifecycle is being observed.