air for android - stage.setOrientation 在 AIR 2.5 中已弃用,那么我现在该怎么做?
as3 air for android 使用 flash CS5
我的问题:在我的 droid 2 global 上测试 AIR 应用程序(带滑出键盘) 使用 stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,handleOrientationChange); 仅当我滑出键盘时才会触发此操作,而不是在旋转手机时触发。 我已经尝试过打开和关闭自动方向以及纵向和横向方面。
实际上,自动方向选项的打开或关闭似乎没有什么区别。
当我旋转手机时,我需要改变方向。我知道我可以使用加速度计来执行此操作,但问题是当我在关闭键盘的情况下单击文本字段时,只会弹出垂直键盘,而我需要在侧握手机时弹出另一个键盘。
as3 air for android using flash CS5
my problem: testing an AIR app on my droid 2 global (with slide out keyboard)
using stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, handleOrientationChange);
this is only fired when the i slide the keyboard out and not when I rotate the phone.
I have tried this with the auto orientation on and off and with the aspect to portrait and landscape.
actually the auto orientation option does not seem to make a difference on or off.
I need the orientation to change when i rotate the phone. I know i can use the accelerometer to do this but the problem with that is when I click on a textField with the keyboard closed only the vertical keyboard pops up and i need the other one to pop up when holding the phone sideways.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有同样的问题。研究了一下,发现了 stage.setAspectRatio。它对我来说没什么用,但也许你可以想出一些办法。
如果您知道更多信息,请告诉我!
I have the same problem. Researched a bit and found out about stage.setAspectRatio. It doesn´t do very much for me, but maybe you could figure something out.
Let me know if you figure out some more!
我在我的博客上发布了一个跨平台兼容的解决方案:
http://digitale-avantgarde.com/orientierungslos/< /a>
正如你可能注意到的,它是德语的,但你可以用谷歌翻译它!
如果您对我的博客发表评论,我将非常感激;)
如果您完全迷失了(并且不愿意询问),您可以在文章末尾下载 StageOrientationObserver 类,然后使用此代码获取黄金:
I've posted a crossplatform-compatible solution on my blog:
http://digitale-avantgarde.com/orientierungslos/
As you may notice, it's in german, but you can translate it with google!
I'd really appreciate it, if you do comment on my blog ;)
If you're totally lost (and not willing to ask), you can just download the class StageOrientationObserver on the end of the article and go for gold using this code: