4 Oct 2012 1:41 AM #1
Orientation event: timing problem gives resolution problem in Android stock browser
Ext version tested:
- Sencha Touch 220.127.116.11
- Android Stock Browser 4.0.3
When changing orientation mode often (70%+) the layout will be rendered to what seems like the previous orientation-mode resolution. So e.g. in portrait mode it will only use 55% of the heights screen, and only half of the pages width will show because the devices screen width is too small.
Steps to reproduce the problem:
- Create app and use the Main.js / LoginView.js code of (http://www.sencha.com/forum/showthre...negap-Android))
- build a production version (sencha app build production)
- Visit page through devices browser
- change orientation a few times until its rendering fails to fill screen properly
- Screen keeps its correct rendering
- Screen has bad rendering
- set a listener to the orientation-event of the viewport, which fires Ext.Viewport.setSize() after a small delay (500ms) (see http://www.sencha.com/forum/showthre...negap-Android)
- Android Stock Browser 2.0.3 doesn't show this problem
- On Android Stock Browser 4.0.3, it seems Sencha corrects the view on the non-production code (so non-minified)
4 Oct 2012 7:33 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Have you tried in a newer release like 2.1.0 RC1?Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
5 Oct 2012 4:20 AM #3
Hi, it looks like it's more stable now with this upgrade.
- I've tested on Android 2.0.3 and no problems (as before)
- 4.0.4 now on first load seems stuck in portrait mode, even if i change orientation.
On refresh however it's fine and so far it hasn't messed up the resolution.
(this is sort of the opposite as before, when on first load I think 99% of the time it would work)
and then this person who has seemingly the same problem: