sencha touch 在安卓中横屏、竖屏切换 应用崩溃问题

答案来至于 Sencha Touch 交流 @周旭

这是由于横竖屏转换导致activity重跑onCreate方法导致的,有两种解决方案:
1、横竖屏转换的时候不要重新跑onCreate方法,这个可以在manifest.xml的对应activity中增加这个属性:“android:configChanges="orientation|screenSize"”;
2、禁止横竖屏转换,在manifest.xml的对应activity中增加这个属性“android:screenOrientation="landscape"”或者“android:screenOrientation="portrait"”。

posted @ 2014-11-12 11:25  魔狼再世  阅读(748)  评论(0编辑  收藏  举报