我想在服务中编写多点触控功能。如何在此服务中将单点触控更改为多点触控?
我在这种情况下发现e.getPointerCount()总是== 1.任何想法?
先谢谢!
public void onCreate(){
super.onCreate();
startForeground(1, new Notification());
mViewService = ViewService.getInstance(this);
mViewService.addView(ViewService.TOUCH_VIEW);
mViewService.getView(ViewService.TOUCH_VIEW).setOnTouchListener(new TouchListener());
}
class TouchListener implements View.OnTouchListener{
@Override
public boolean onTouch(View v, MotionEvent e){
int pointerCount=e.getPointerCount();
//question: why pointerCount always == 1?I wanna >=3.
//how can I chance to multi-touch.
}
}