We are using CLEAR_TOP and NEW_TASK flags to tidy up a back stack in Android when displaying certain views
For instance in an app that has ViewA, ViewB, ViewC and ViewD we are are always loading ViewC with CLEAR_TOP and NEW_TASK.
In the case of a BackStack of
- ViewA (Root)
- ViewB
- ViewC
- ViewD
Displaying ViewC from ViewD would cause ViewD to be destroyed. Is there anyway of ViewD knowing it has been destroyed because of CLEAR_TOP rather than simply because the user has gone away from the View?