title: Android Multi-touch event problems...No new touch events while dragging?
body: <p>So what I'm trying to make is a little space game, You control the ship with a <strong>graphic on-screen joystick</strong> using <code>touch</code> and <code>drag</code>. I have gotten this to work fine. The problem arises once I started to try and add the ability to touch the top portion of the screen to fire a weapon. For some reason, if you are currently <strong>dragging the joystick</strong> it seems to ignore the other touch input and doesn't do anything (But it works fine once I stop holding the <code>joystick</code>).
  This is my both my first time working with java, and with <code>Android</code> so its probably something stupid, but iv been stuck on it for a few days.
  Anyway, here my code. </p>
  
  <p>The below is from my </p>
  
  <pre><code>public class Panel extends SurfaceView implements SurfaceHolder.Callback {
      @Override
      public boolean onTouchEvent(MotionEvent event) {    
          fingers= event.getPointerCount();  //Returns 1 or 2 properly if 2 fingers on screen
          playership.onTouchEvent(event); //Pass the event along to the spaceship object
          return true;
          //return super.onTouchEvent(event); //no idea what this does, but it seems to disable the drag event
      }
  </code></pre>
  
  <p>Below is the playership.onTouchEvent(event); function</p>
  
  <pre><code>public boolean onTouchEvent(MotionEvent event) {
      switch (event.getAction()) 
      {        
          case MotionEvent.ACTION_DOWN:
              if(event.getY()&lt;(Panel.mHeight-150))
              {
                  Laser1.reset(mX,mY,(int)event.getX(),(int)event.getY());
              }
              break;
      }
      joy1.onTouchEvent(event);
      return true;
  }
  </code></pre>
  
  <p>And below is the  joy1.onTouchEvent(event);</p>
  
  <pre><code>public boolean onTouchEvent(MotionEvent event) {
  
      int eventaction = event.getAction();
  
      //Offset between mouse(x,y) and center
      double offx=oX-event.getX();
      double offy=oY-event.getY();
      double d=Math.sqrt((offx*offx)+(offy*offy));
  
      switch (eventaction ) 
      {        
          case MotionEvent.ACTION_DOWN:
              if(d&lt;dragrange) //Start Dragging if clicked
              {
                  offx=offx/d;
                  offy=offy/d;
                  Dragging=true;
                  reset = false;
                  dX=(int) (offx*dragrange);
                  dY=(int) (offy*dragrange);
              }
              break;
          case MotionEvent.ACTION_MOVE:                
              if(Dragging)//if joy is already being draged, update it.
              {
              offx=offx/d;
                  offy=offy/d;
                  if(d&gt;dragrange)
                  {
                      dX=(int) (offx*dragrange);
                      dY=(int) (offy*dragrange);
                  }
                  else
                  {
                      dX=(int) (offx*d);
                      dY=(int) (offy*d);
                  }
                  reset = false;
              }
          break;
          case MotionEvent.ACTION_UP:
              if(Dragging)
              {
                 Dragging=false;
              }
              break;
      }
      return true;
  }
  </code></pre>
  
  <p>So yeah, the problem is that if the joystick is in the middle of a case <code>MotionEvent.ACTION_MOVE</code> it seems to block any other touch events from properly registering.</p>