如果设备默认不支持j2me如何在应用程序中实现横向
我有诺基亚 2323c 设备,我想以横向模式显示我的应用程序。
我尝试将 Nokia-MIDlet-App-Orientation : Landscape 添加到 JAD,但它对我不起作用。
能做到吗?
谢谢。
I have nokia 2323c device, and i want display my application in landscape mode.
I tried to add Nokia-MIDlet-App-Orientation : landscape to JAD, but it doesn't work for me.
Can it be done?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该手机看起来就像普通的直板式手机,通常没有用户会在横向模式下使用......
我敢打赌,它不会有传感器来检测并通知您何时用户将设备转为横向模式。
但假设这不是您想要的,并且您只想默认以横向模式绘制所有内容,是的,您可以做到......只要您的应用程序使用基于 Canvas 的 UI 而不是基于 Form 的 UI。
您需要用自己的图形绘制函数来包装。例如,
drawRect(x, y, w, h)
,要使其在横向模式下工作,您需要实现它如下所示:您还需要使用
Sprite
类的文本绘制函数。That handset looks like a regular candybar style phone, that no user would normally use in landscape mode...
I bet it won't have a sensor to detect and inform you when the user has turned the device in to landscape mode.
But assuming that's not what you want, and you just want to draw everything in landscape mode by default, yes you can do it... as long as your app uses Canvas-based UI and not Form-based.
You need to wrap the Graphics drawing functions with your own. For example,
drawRect(x, y, w, h)
, to make this work in Landscape mode you'd implement it something like as follows:You'd also need to make use of the
Sprite
class's text drawing functions.