简体   繁体   English

Android / Web App-将横向设置为纵向

[英]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.

相关问题 当iPad中方向从横向更改为纵向时,页面会缩小 - Page zooms out when orientation changes from landscape to portrait mode in iPad 当方向从纵向更改为横向模式时,ESRI地图未正确居中 - ESRI Map is not centered properly when orientation changes from Portrait to Landscape mode ios iframe只有在方向从纵向更改为横向后才能展开 - ios iframe unscrollable only after orientation change from portrait -> landscape 如何在移动Web应用程序上禁用切换横向/纵向(Android Browser / iOS-Mobile Safari) - How to disable toggling of landscape/portrait on a mobile web app (Android Browser/iOS-Mobile Safari) 如何在移动Web应用程序中将方向锁定为纵向模式? - How do I lock the orientation to portrait mode in a Mobile Web Application? 强制“横向”定向模式 - Force “landscape” orientation mode 如何根据纵向或横向模式(以及方向更改)更改“初始比例”? - How do I change “initial-scale” based on portrait or landscape mode (and orientation change)? 使用PHP检索风景/肖像模式 - Retrieve landscape/portrait mode with PHP 为Phonegap / Cordova iOS应用程序强制实现正确的方向横向模式 - Enforce right orientation landscape mode for Phonegap/Cordova iOS app Web 应用程序 - 在 Web 应用程序加载时将方向锁定为横向 - Web application - Lock orientation to landscape on web app load
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM