【问题标题】:two questions about orientation change关于方向变化的两个问题
【发布时间】:2012-03-27 00:25:23
【问题描述】:
  1. 当我在模拟器上运行我的应用程序并切换到横向时,我的活动重绘没有问题,但是当我切换回纵向时,屏幕方向发生变化,但我的应用程序不会自行重绘。为什么?

  2. 1234563钥匙。为什么?编辑:这是因为我没有在我的活动中设置 configChanges 属性。

感谢您的帮助!

【问题讨论】:

  • 当你覆盖 onConfigurationChanged 时你是否设置了 android:configChanges="orientation|keyboard"??
  • 我没有,添加这个属性后第二个问题就解决了,谢谢!

标签: android android-layout android-emulator


【解决方案1】:

不用担心这个问题,因为这不是您的应用程序编码问题,而是模拟器的问题。

我也遇到过这个问题,但是当我在我的设备上运行我的应用程序时,它运行没有任何问题..

In mine it appears to only do this for the Google APIs (Google Inc.) 2.3.3 API Level-10 AVD.
 The normal Android 2.3.3 seems to rotate as expected. Not sure if this is a bug or what.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多