https://kotlinlang.org logo
m

Marcin Środa

09/08/2020, 12:49 PM
How to deal with lifecycle in Composable? I’ve based on
onActive
/
onCommit
/
onDispose
, but what about something similar to
onPause
/
onResume
? I’m looking for something that will tell me that the activity has gone background / foreground.
f

flosch

09/08/2020, 1:37 PM
You can look into
LifecycleOwnerAmbient
if you used
Activity.setContent
Although I would try to not let Activtiy lifecycle bleed too much into composables…
4 Views