Closed Pierre-Lucas closed 7 years ago
These ressources may help
(Full of dark, unholy and forbidden solutions) http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android (Seems to have more "acceptable" solutions) http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html
Easiest "solution" so far seems to be to simply remove the Up navigation in the menu by removing parent attributes in Manifest and relying strictly on the Android navigation back button.
see fda69b3
Final solution is entirely done in Manifest. Parent attributes removed and orientation locked to Portrait mode.
When navigating back to the main activity using the Toolbar back button with the monitoring active, the UI of the Main Activity will reset to default values and nothing will update. Logcat shows that the monitoring is still happening in the background.
This also happens when the UI redraws on a screen rotation event
This does not happen when navigating back using the hardware back button.