title: Android dispatch touch event to main activity when dialog is showing
body: <p>I have a <code>DialogFragment</code>, it's <code>onCreateDialog()</code> looks something like</p>
  
  <pre><code>Dialog dialog = new Dialog(getActivity(), R.style.Theme_Translucent_NoTitleBar);
  dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  dialog.setContentView(parentView);
  dialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
  dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.R.color.transparent));
  
  parentView.setOnTouchListener(onTouchListener);
  return dialog;
  </code></pre>
  
  <p>The onTouchListener looks something like</p>
  
  <pre><code>private OnTouchListener onTouchListener = new OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
          Bundle bundle = getArguments();
          int[] coordinates = bundle.getIntArray(COORDINATES);
          int radius = bundle.getInt(RADIUS);
  
          float x = event.getX();
          float y = event.getY();
  
          Log.d(TAG, "called touch");
  
          if (Math.pow(x - coordinates[0], 2) + Math.pow((y - coordinates[1]), 2) &lt; Math.pow(
                  radius, 2)) {
              getActivity().dispatchTouchEvent(event);
              Log.d(TAG, "bubbled");
          }
          return false;
      }
  };
  </code></pre>
  
  <p>I would like the touch events that are in a particular region (see circle in pic below) to be handled by the activity instead, so that the button from the activity is clicked.  Otherwise, I want the dialog to handle the touch event.</p>
  
  <p><img src="https://i.stack.imgur.com/SkjqS.png" alt="picture"></p>
  
  <p>For the record, YES, the Log statement "<code>bubbled</code>" IS being called, so clearly the <code>getActivity().dispatchTouchEvent(event)</code> method isn't working as intended.</p>
  
  <p>I have noticed that sometime even the <code>onTouchEvent()</code> method from the activity is called, yet the button still doesn't respond, what gives?</p>