ANDROID:如何在屏幕上创建一个虚拟区域,位于用户可以按下以执行操作的所有内容之上?
我正在尝试对 swipepad、taskxp 和 taskie 等用户滑动的应用程序做一些类似的事情
或者触摸手机屏幕的某个区域(例如边缘),即使未显示程序的活动,程序也会运行。
我不知道从哪里开始,因为我什至不知道它叫什么
任何帮助将不胜感激!
i am trying to do something silmiar to apps like swipepad, taskxp, and taskie where the user swipes
or touches an area of the phone screen like the edges and the program functions even if its activity is not shown.
I have no idea where to start since i dont even know whats its called
Any help would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是类似问题的答案 获取坐标触摸屏后台服务:
,但只能在活动运行时接收触摸事件。
以下是在活动中创建触摸侦听器的方法:
当然,您可以向其中添加更多内容。在那里,我只是记录触摸发生位置的 x 和 y 坐标。
Here's the answer to a similar question Get co-ordinates touch screen in a background service:
But you can only receive touch events with an activity running.
Here's how you would do a touch listener in an activity:
Of course you can add more to it. There, I'm just logging the x and y coordinates of where the touch happened.