After rotating mobilephone
- onConfigurationChanged
- onPause
- onSaveInstanceState
- onStop
- onDestroy
Following
- onStart
- onRestoreInstanceState
- onResume
NOTE: Important to keep state UI
- Save any state in onSaveInstanceState
- Restore InstanceState in onRestoreInstanceState
To restore UI from InstanceState:
- restore in onResume
- if you use background service in OnStart, wait until it is finish. Easier way is UI handler -> handleMessage
No comments:
Post a Comment