5 ms·
Two problems with rotation: 1) The article list scrolling position is reset. 2) On my Nexus 7, going from landscape to portrait while viewing comments closes
by veeti 14y ago
Two problems with rotation:
1) The article list scrolling position is reset.
2) On my Nexus 7, going from landscape to portrait while viewing comments closes the comments.
- RossM 14y agoRotation issues are usually to do with the activity being recreated (i.e. onCreate is called again) as the screen size has changed. There is a config to disable this however: http://developer.android.com/guide/topics/resources/runtime-changes.html http://developer.android.com/guide/topics/resources/runtime-...
- veeti 14y agoIf you mean configChanges, I would strongly recommend against it because it is a bad practice and it probably wouldn't work in this case anyway (no activity recreation = no multi-panel layout on a 7-inch landscape screen).
- yock 14y agoIt's usually better to implement onSaveInstanceState and onRestoreInstanceState. http://stackoverflow.com/questions/3542333/how-to-prevent-custom-views-from-losing-state-across-screen-orientation-changes http://stackoverflow.com/questions/3542333/how-to-prevent-cu...
- veeti 14y ago3) Opening the comments of an article in portrait mode and then going landscape on the Nexus 7 crashes the app completely (presumably due to the multi-panel mode in sw600dp+ screens?)