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

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

相关文章:

  • 2021-06-15
  • 2021-09-14
  • 2021-12-02
  • 2022-12-23
  • 2021-12-03
  • 2021-09-30
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-12-23
  • 2021-06-19
  • 2022-12-23
相关资源
相似解决方案