如何在j2me应用程序中锁定横向模式? [英] How to lock the landscape mode in j2me app?

查看:99
本文介绍了如何在j2me应用程序中锁定横向模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想以纵向模式显示我的应用程序.我必须在我的应用程序中限制横向模式.

I want to show my app only in portrait mode. I have to restrict the landscape mode in my app.

每个设备都有单独的属性.

There are separate attributes for each devices.

对于诺基亚,诺基亚-MIDlet-App-Orientation:纵向. 对于三星, MIDlet-ScreenMode:纵向.

For Nokia, Nokia-MIDlet-App-Orientation : Portrait. For Samsung, MIDlet-ScreenMode : Portrait.

在JAD中添加了这些文件后,我尝试将其安装在诺基亚C5中.我无法安装.我收到必填属性缺失错误,因为自定义JAD属性不应以 MIDlet-开头.由于 MIDlet-ScreenMode:Portrait 属性,我无法安装它.

After adding these in JAD, I tried to install it in Nokia C5. I am unable to install it. I am getting Compulsory attribute missing error because custom JAD property shouldn't start with MIDlet-. I am unable to install it because of MIDlet-ScreenMode : Portrait property.

在诺基亚,LG,摩托罗拉,三星等所有设备中,是否有任何通用代码可锁定风景模式,

Is there any general code to lock the landscape mode in all devices like NOKIA, LG, Motorola, Samsung etc.,

推荐答案

在MIDP中无法将应用锁定到方向.这通常是通过不同设备上的专有JAD参数来实现的.您需要找出这些参数针对您要定位的设备,然后将它们添加到您的JAD中.

There is no way in MIDP to lock an app to an orientation. This is usually implemented via proprietary JAD parameters on different devices. You need to find out what these parameters are for the devices you wish to target and add them to your JAD.

某些方法可以在这个问题.

这篇关于如何在j2me应用程序中锁定横向模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆