【发布时间】:2012-07-03 21:38:15
【问题描述】:
我目前正在从服务接收触摸事件。
我想到的一种方法是在系统视图上使用 TouchDelegate,将其边界扩展到屏幕,然后从委托中接收触摸事件。
但是,当我使用
((Activity)ctx).getWindow().getDecorView().setTouchDelegate(new TouchDel(bounds, view));
在我的服务中,我得到一个空指针异常和强制关闭。
【问题讨论】:
-
你找到解决方案了吗?
标签: android service touch-event