public boolean onTouch(View v, MotionEvent event) {
    boolean result = false;

    for (int i = 0; i < buttons.length; ++i) {
      if (buttons[i].processTouch(v, event)) {
        result = true;
        break;
      }
    }

    if (result != true) {
      gestureDetector.onTouchEvent(event);

      for (int i = 0; i < joysticks.length; ++i) {
        JoystickBase joy = joysticks[i];
        if (joy != null) {
          if (joy.processTouch(v, event)) {

            result = true;
          }
        }
      }
    }

    //		if (event.getAction() == MotionEvent.ACTION_MOVE) {
    //		    // Trying to avoid flooding of ACTION_MOVE events
    //			try {
    //				Thread.sleep(33);
    //			} catch (InterruptedException e) {
    //				e.printStackTrace();
    //			}
    //		}

    return result;
  }