I have an activity with a launchMode
of singleTop
but I want it to refresh when I go up to it from a child activity. Currently, because my fragment (which contains the UI) is instantiated in the activity's onCreate()
, the UI doesn't reload when returning to it. But if I instantiated the fragment in onStart()
it would be called when the activity is restarted. While I've gained understanding of the Activity lifecycle, I still don't fully understand how it and the Fragment lifecycle must coexist. I instantiate the fragment in the activity's onCreate()
because that's what the tutorial app did.
Anyway, would this work?
I'm asking this in search of a potential solution to this question, which I asked but no one has answered. Thanks.