RiveViewLifecycleObserver

The DefaultLifecycleObserver tied to a RiveAnimationView. Created within RiveAnimationView() to make sure things are properly cleaned up when the View is destroyed.

Note: Since the RiveAnimationView can change LifecycleOwner during its lifetime, this is updated within RiveAnimationView.onAttachedToWindow. If there is a new LifecycleOwner, onStart, and onResume will be called again when it is registered.

Constructors

Link copied to clipboard
constructor(dependencies: MutableList<RefCount>)

Functions

Link copied to clipboard
fun insert(dependency: RefCount)
Link copied to clipboard
open fun onCreate(owner: LifecycleOwner)
Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)

DefaultLifecycleObserver.onDestroy is called when the LifecycleOwner's ON_DESTROY event is thrown. This typically happens when the Activity or Fragment is in the process of being permanently destroyed.

Link copied to clipboard
open fun onPause(owner: LifecycleOwner)
Link copied to clipboard
open fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open fun onStop(owner: LifecycleOwner)
Link copied to clipboard
fun remove(dependency: RefCount): Boolean