I am developing a game, and I need to be able to detect that one finger is performing MOVE, and the other finger can READ another part of the screen.
In the following code, I can detect both ACTION_MOVE (in a specific area of ββthe screen) and ACTION_DOWN
public boolean onTouch(View v, MotionEvent event) { final int dest_x = (int) event.getX(); final int dest_y = (int) event.getY(); onTrackPad = dbSettings.TRACK_PAD.contains(dest_x, dest_y); switch (event.getAction()) { case MotionEvent.ACTION_MOVE: if (onTrackPad) {
The problem is that I canβt move and shoot at the same time (I need to stop moving to shoot and vice versa)
I know that Android can handle events with multiple touches , but it doesn't matter how to use this to handle these events and at the same time so that the player can move and shoot at the same time
I also try to use getActionMasked with no luck
android event-handling
Mauricio Gracia Gutierrez
source share