传感器事件 [英] Sensor Events

查看:113
本文介绍了传感器事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在开发一款具有特定布局的应用,该布局由用户当前的屏幕方向决定。到目前为止,我已经通过标准横向视图设计了布局。我希望能够以某种方式测试事件监听器而不用
一个实际的平板电脑。模拟器似乎没有创建事件。我不想假设事件触发,我的代码重构屏幕。有什么想法吗?

Hello, I am working on an app that will have a specific layout that is determined by the users current screen orientation. So far I've designed the layout by the standard landscape view. I am hoping to be able to somehow test the event listener without an actual tablet. The simulator does not seem to create an event. I would hate to just assume that the event triggers and my code restructures the screen. Any ideas?

推荐答案

您是否明确地聆听传感器,或者在纵向和横向模式之间切换时如何处理布局事件需要帮助? ?

Are you explicitly listening to the sensor or do you just need help with how to deal with layout events when switching between portrait and landscape modes?

如果是后者,您使用的是哪个UI平台? HTML? XAML? DirectX?

If the latter, which UI platform are you using? HTML? Xaml? DirectX?

模拟器确实在纵向和横向之间切换,并应提供适当的布局事件。它不会模拟实际的传感器。

The simulator does switch between portrait and landscape and should provide appropriate layout events. It does not simulate the actual sensors though.

- Rob


这篇关于传感器事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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