模拟,而不是检测它onFling()编程(安卓) [英] Simulate onFling() programmatically instead of detecting it (Android)
本文介绍了模拟,而不是检测它onFling()编程(安卓)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我对计算器的第一篇文章!我有一个后台服务运行,我在想,如果我能真正模拟水平一扔触摸屏手势,而不是只检测到它被调用。
This is my first post on StackOverflow! I have a background service running and I was wondering if I could actually simulate a horizontal fling touch screen gesture instead of just detecting that it was been called.
我可以计算出如何捕捉到这一事件,但我想实际模拟,而不是等待一个触摸一扔水平的姿态。
I can figure out how to capture this event, but I want to actually simulate a touch fling horizontal gesture instead of waiting for one.
由于事先!
推荐答案
有一个的 API 模拟触摸事件。 有人报告有限的成功模拟使用一扔该TouchUtil API。
There is an API for simulating touch events. Some people report limited success simulating a fling using the TouchUtil API.
这篇关于模拟,而不是检测它onFling()编程(安卓)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文