subscribe

Convenience method to subscribe an AppCompatActivity to this ActivityLifecycleSubscribable using its default LifecycleOwner and FragmentManager.


Convenience method to subscribe a Fragment to this ActivityLifecycleSubscribable using its default LifecycleOwner and FragmentManagers.


Subscribes a LifecycleOwner to this ActivityLifecycleSubscribable.

Parameters

activity

The Activity associated with the lifecycle or null if none exist.

owner

The LifecycleOwner owning the lifecycle.

fragmentManager

The FragmentManager attached to the lifecycle.


fun ActivityLifecycleSubscribable.subscribe(activity: Activity?, owner: LifecycleOwner, parentFragmentManager: FragmentManager, childFragmentManager: FragmentManager)

Subscribes a LifecycleOwner to this ActivityLifecycleSubscribable.

Parameters

activity

The Activity associated with the lifecycle or null if none exist.

owner

The LifecycleOwner owning the lifecycle.

parentFragmentManager

The FragmentManager attached to the lifecycle.

childFragmentManager

Optional FragmentManager that hosts androidx.fragment.app.Fragment with the Fragment owning the lifecycle.