-
- 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 UnitonCreate(LifecycleOwner owner)UnitonStart(LifecycleOwner owner)UnitonResume(LifecycleOwner owner)UnitonPause(LifecycleOwner owner)UnitonStop(LifecycleOwner owner)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
-
onCreate
Unit onCreate(LifecycleOwner owner)
-
onStart
Unit onStart(LifecycleOwner owner)
-
onResume
Unit onResume(LifecycleOwner owner)
-
onPause
Unit onPause(LifecycleOwner owner)
-
onStop
Unit onStop(LifecycleOwner owner)
-
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.
-
-
-
-