Android的 - 修复屏幕方向1页只(PhoneGap的)屏幕、方向、Android、PhoneGap

由网友(~>血染刀下人)分享简介:我有固定的屏幕方向的只有我的index.html页面的问题。我想允许该应用除了在主页上旋转。据我所知,添加以下到你的活动 - 安卓screenOrientation =画像旋转停止屏幕I am having an issue with fixing the screen orientation for my inde...

我有固定的屏幕方向的只有我的index.html页面的问题。我想允许该应用除了在主页上旋转。据我所知,添加以下到你的活动 - 安卓screenOrientation =画像旋转停止屏幕

I am having an issue with fixing the screen orientation for my index.html page only. I want to allow the app to rotate except on the home page. I understand that adding the following into you activity - android:screenOrientation="portrait" stops the screen from rotating.

不过,我需要设置此所以它是特定页面。我使用PhoneGap的,因此,需要停止我的网页查看页面。

However, I need to set this so it is page specific. I am using phonegap and therefore, need to stop my web view pages.

我打过电话了以下活动我的清单内 - com.phonegap.droidgap.index.html,然而这并没有工作。

I tried calling the following activity within my manifest - com.phonegap.droidgap.index.html, however this did not work.

可能有人请指点我一下,我怎么可以定义固定方向1页只?

Could someone please advice me as to how I can define the fixed orientation for 1 page only?

在此先感谢

推荐答案

您可以使用此插件的PhoneGap为Android:

You can use this PhoneGap Plugin for Android:

https://github.com/champierre/pg-plugin-screen-orientation

和添加到您的index.html页面的onload:

And add to your index.html page onload:

navigator.screenOrientation.set('portrait');
阅读全文

相关推荐

最新文章