Android phonegap 构建中的方向?

Android orientation in phonegap build?

有没有在config.xml中声明这段代码的(android.manifest在phonegap构建中不存在):

<activity
            android:name=".Activity.SplashScreenActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape">
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />
                <category
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

我想在我的应用程序中始终强制横向显示,而其他声明似乎不起作用...有什么想法吗?

您必须在 config.xml 中添加以下行:

<preference name="Orientation" value="landscape" />

Documentation

@totothegreat, 您可能还记得以前的 post:

Lastly, if you want to implement this with config.xml, then I suggest you read the thread with Ben Jones' implementation. Best of luck, text me back, if you are still having problems.

这个post有什么不清楚的吗?有什么需要解释的吗?

杰西