title: Android overlay layout on top of all windows that receives touches
body: <p>I have created a view that displays on top of all applications and windows with the following code: </p>
  
  <pre><code>        //These three are our main components.
      WindowManager wm;
      LinearLayout ll;
      WindowManager.LayoutParams ll_lp;
  
      //Just a sample layout parameters.
      wm = (WindowManager) getSystemService(WINDOW_SERVICE);
      ll_lp = new WindowManager.LayoutParams();
      ll_lp.format = PixelFormat.TRANSLUCENT;
      ll_lp.height = WindowManager.LayoutParams.FILL_PARENT;
      ll_lp.width = WindowManager.LayoutParams.FILL_PARENT;
      ll_lp.gravity = Gravity.CLIP_HORIZONTAL | Gravity.TOP;
  
      //This one is necessary.
      ll_lp.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
  
      //Play around with these two.
      ll_lp.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
      ll_lp.flags = ll_lp.flags | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
  
      //This is our main layout.
      ll = new LinearLayout(this);
      ll.setBackgroundColor(android.graphics.Color.argb(50, 255, 255, 255));
      ll.setHapticFeedbackEnabled(true);
      ll.setOnTouchListener(new OnTouchListener() {
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              Toast.makeText(getApplicationContext(), "TOUCHED", Toast.LENGTH_SHORT).show();
              return false;
          }
          });
  
      //And finally we add what we created to the screen.
      wm.addView(ll, ll_lp);
  </code></pre>
  
  <p>Because FLAG_NOT_TOUCHABLE is set, it only displays the view but doesn't receive any touch events. The application behind the view receives all touch events. 
  However, if i don't set the flag, then only the view receives touches causing the application behind it to not receive any. </p>
  
  <p>Is there a way for both the view and the application behind it to receive touches? I have tried returning false but still the same. </p>
  
  <p>Any help would be greatly appreciated!</p>