[英]Android/ Web App - Setting orientation to portrait mode from landscape
I have a app which I have built in PhoneGap and within the Android Manifest file I have set the orientation to landscape, as my app is required to be in landscape mode at all time. 我有一个内置在PhoneGap中的应用程序,并且在Android Manifest文件中已将方向设置为横向,因为我的应用程序始终需要处于横向模式。
The issue I have is that I have a few external links, which load up in the default phone browser, however due to the fact that the phone is being held in landscape mode the page loads in landscape mode, which then does not fit all the content properly. 我的问题是我有一些外部链接,这些链接在默认的手机浏览器中加载,但是由于手机以横向模式保存,因此该页面在横向模式下加载,因此该页面无法适应所有适当地满足。
So my question is whether there is a way to set the orientation to automatically change to portrait when the external link is clicked. 所以我的问题是,是否有一种方法可以将方向设置为在单击外部链接时自动更改为纵向。 I am currently loading the external page within my javascript using:
我目前正在使用以下方法在javascript中加载外部页面:
window.location.href = "http://www.test.com";
Thanks in advance, 提前致谢,
You cannot do like this. 你不能这样。 User can only set the orientation of browser into default portrait or landscape mode
用户只能将浏览器的方向设置为默认的纵向或横向模式
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.