Achraf Amil
03/12/2020, 2:16 PMDominaezzz
03/12/2020, 2:20 PMFrancisco Javier Ruiz Rodriguez
03/12/2020, 2:21 PMAchraf Amil
03/12/2020, 2:24 PMsuspendCancellableCoroutine
) just like the Animator.awaitEnd()
in here
https://medium.com/androiddevelopers/suspending-over-views-19de9ebd7020Achraf Amil
03/12/2020, 2:26 PMAchraf Amil
03/12/2020, 2:29 PMAchraf Amil
03/12/2020, 2:30 PMviewLifecycleOwner.lifecycleScope
(e.g. waiting for animation to end).Evan R.
03/12/2020, 2:43 PMAchraf Amil
03/12/2020, 2:46 PMThe only memory it takes up is the memory required for any local variables within the suspend functionso having tens of coroutines (with reasonable local variables) waiting to be resumed is no overhead. 👌
Achraf Amil
03/12/2020, 2:48 PM