-
- All Implemented Interfaces:
-
androidx.lifecycle.DefaultLifecycleObserver,androidx.lifecycle.LifecycleObserver
public class RiveViewLifecycleObserver implements DefaultLifecycleObserver
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.
-
-
Constructor Summary
Constructors Constructor Description RiveViewLifecycleObserver(List<RefCount> dependencies)
-
Method Summary
Modifier and Type Method Description UnitonDestroy(LifecycleOwner owner)DefaultLifecycleObserver.onDestroy is called when the LifecycleOwner's ON_DESTROY event is thrown. final Booleanremove(RefCount dependency)final Unitinsert(RefCount dependency)-
-
Method Detail
-
onDestroy
@CallSuper() Unit onDestroy(LifecycleOwner owner)
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.
-
-
-
-