title: How to intercept all click events in an activity?
body: <p>I have some views that I have performed <code>view.setOnClickListener(listener)</code> on. </p>
  
  <p>I currently want to intercept all click events, check where they occurred and do some pre-processing before handing the events off to be processed normally. Is this possible?</p>
  
  <pre><code>private View.OnTouchListener exampleListener = new View.OnTouchListener()
  {
      // some kind of middleware for click events basically
      @Override
      public boolean onTouch(View v, MotionEvent event)
      {
          int action = event.getAction();
  
          if (isAClick(action) &amp;&amp; inSomeRectOfScreen(action))
          {
              doSomething();
  
              return false; // pass handling to normal view hierarchy
          }
          else
          {
              return false; // pass handling to normal view hierarchy
          }
      }
  };
  </code></pre>