简体   繁体   English

IBM Worklight 6.0-如何强制纵向启动屏幕?

[英]IBM Worklight 6.0 - How to force portrait splash screen?

I need to force just the splash screen in portrati orientation, for all devices. 对于所有设备,我只需要强制启动屏幕为纵向。

On Worklight, Phonegap or cordova, there is some configuration that i can use to do it? 在Worklight,Phonegap或cordova上,有一些配置可以用来做吗?

To lock the application's orientation in Android, open the AndroidManifest.xml file (located at yourProject\\apps\\yourApp\\android\\native) and add the following: 要在Android中锁定应用程序的方向,请打开AndroidManifest.xml文件(位于yourProject \\ apps \\ yourApp \\ android \\ native),然后添加以下内容:

<activity android:name="MyActivity" android:screenOrientation="portrait"></activity>

As for keeping the splash in portrait but the app in both portrait and landscape, this is not the right approach in my opinion. 至于将飞溅保持为纵向,而将应用程序保持为纵向和横向,我认为这不是正确的方法

Instead, you should create your splash image using Google's 9patch approach so that it would fit properly both portrait and landscape. 相反,您应该使用Google的9patch方法创建初始图像,以使其既适合纵向又适合横向。

What you are asking for is not possible (in Worklight, or at all?) IMO. IMO(在Worklight中还是根本没有)要求什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM