architecture-components-samples
architecture-components-samples copied to clipboard
Is it guaranteed that Fragment's View will be destroyed and recreated while navigating?
trafficstars
An Android Navigation Component question. Thanks for great work on this by the way.
Is it guaranteed that Fragment's view gets destroyed and recreated when navigating away / coming back to Fragment destination? (onViewDestroyed -> OnViewCreated)
I thought it is but recently I stumbled upon cases when these callbacks are not called. Only onPause and onResume. Is it explained somewhere?
Cheers
Just a follow up.
Apparently if you define app:exitAnim in the relevant navigation graph action the view of exited fragment is NOT destroyed and recreated during navigation forward and backwards. No idea if this is intended or not.