How to implements touch listerner continuous like keyReapted (Andengine)
I implements IOnSceneTouchListener and override method in class and i implements in scene
scene.setTouchAreaBindingEnabled(true);
scene.setOnSceneTouchListener(this);
public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {
Log.v("TouchEvent X",""+pSceneTouchEvent.getX());
L开发者_运维技巧og.v("TouchEvent Y",""+pSceneTouchEvent.getY());
return true;
}
and i able to get x any y position for every touch. How i get x and y postion for continuous touch
If by continuous you mean dragging/sliding over the screen, then you need to implement GestureListener. And measure initial .getX(), getY() and final getX(),getY()coordinates, since it allows you two MotionEvents.
加载中,请稍侯......
精彩评论