When the orientation of an Android device is changed from portrait to landscape or vice versa, Android restarts the app and the data previously displayed in the UI is lost. To prevent this, Android has 2 callback methods: onSaveInstanceState() and onRestoreInstanceState().
This PR allows the programmer to add these two callback methods in his toga.App code.
In onSaveInstanceState(), the programmer can then save the widget data and in onRestoreInstanceState(), he can restore the data after the app has restarted and the UI has been rebuilt.
When the orientation of an Android device is changed from portrait to landscape or vice versa, Android restarts the app and the data previously displayed in the UI is lost. To prevent this, Android has 2 callback methods: onSaveInstanceState() and onRestoreInstanceState().
This PR allows the programmer to add these two callback methods in his toga.App code. In onSaveInstanceState(), the programmer can then save the widget data and in onRestoreInstanceState(), he can restore the data after the app has restarted and the UI has been rebuilt.
This PR needs the PR https://github.com/beeware/toga/pull/1386
PR Checklist: