【问题标题】:Phonegap Android don't rotatePhonegap Android 不旋转
【发布时间】:2014-11-17 19:28:04
【问题描述】:

我知道使用 CTRL+MAC+F11 我可以旋转 de AVD(并且正在旋转),但应用程序没有旋转。我发现很多帖子问“如何锁定旋转”,但我希望它旋转!

我的清单是:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1"      android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="com.overloadsoft.storydo" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" 
        android:label="@string/app_name" 
        android:launchMode="singleTop" 
        android:name="StoryDo" 
        android:theme="@android:style/Theme.Black.NoTitleBar"
        >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

我尝试添加

            android:screenOrientation="fullSensor"

还有一些变化,但没有用...

添加: 目标是 Android 4.4.2 API 级别 19 “存在硬件键盘”未选中 具有 Dynamics 硬件控制的皮肤 CPU/ABI:Intel atom x86(带 Intel 加速器)

【问题讨论】:

  • 是安卓4.4吗? This MIGHT be relevant
  • 同样,如果您在“L”开发者预览版模拟器上进行测试,因为它具有相同的模拟器错误。
  • 感谢您的回答!我添加了更多信息,它的 4.4.2(但不是 L)

标签: android cordova rotation landscape


【解决方案1】:

Android 2.3 和 4.4 模拟器存在旋转错误,新的 Android L 开发者预览版也是如此。

此图像来自 2.3。 Here is the issue tracker for 4.4for 2.3Android L 与 Google。

复制步骤

  1. 创建 Android 4.4 ARM 仿真器映像
  2. 打开一个应用程序(例如,Messaging)
  3. 按 - 旋转屏幕

或者from here

在我的情况下,它是通过禁用 "Edit Android Virtual Device (AVD)" 窗口中的 "Hardware keyboard present" 复选框来解决的。


来自 Android L 的 Google 线程:

使用 Android L 模拟器,您可以通过打开应用进入横向,然后打开相机应用(您需要在 AVD 中设置模拟相机)录制视频。然后按 11 的 ctr-f12。在相机应用程序中单击视频缩略图并播放。视频应该是横向的。然后按下多任务按钮和多任务进入您的应用程序。不要转到主屏幕,否则您将不得不进入相机应用程序,转到风景并重播视频!请让我知道这是否适用于任何其他 android 模拟器版本。

【讨论】:

  • 我已经取消选中“硬件键盘存在”...另一个建议?
  • 我阅读了“错误”链接,似乎这是一个大问题......很高兴知道我并不孤单!哈哈哈
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-01
相关资源
最近更新 更多