ShakeGesture 库 WP7 - 摇动计数
我一直在阅读有关您的 ShakeGesture 库的信息,它真的很棒! 但我想知道是否有一种方法可以使用这个库来计算摇晃的次数。 例如,我想要一个应用程序,用户需要摇动手机 30 次。如果用户摇动它 10 次,就会发生一些事情。如果20次,就会发生其他事情。
这样的事情可能吗?
i've being reading about your ShakeGesture library and it's really good!
But i was wondering if there is a way for use this library for count the numbers of a shake.
For example, i want to have an app where the user needs to shake the phone 30 times. If the user shakes it 10 times, something will happen. If 20 times, other thing will happen.
Is something like this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ShakeGesture 库不包含报告有多少个的方法设备因晃动而移动的次数。
但是,它确实允许您自定义
MinimumRequiredMovesForShake
。您可以尝试创建侦听器的多个实例,每个实例配置为侦听不同数量的移动,然后以不同的方式处理事件。The ShakeGesture library doesn't include a way of reporting how many times a device was moved as part of a shake.
However, it does allow you to customize the
MinimumRequiredMovesForShake
. You could try creating multiple instances of the listener, each configured to listen for a different number of moves and then handle the events differently.