title: Android detecting on touch inside fragment
body: <p><img src="https://i.stack.imgur.com/mnIlm.jpg" alt="enter image description here"></p>
  
  <p>I have two fragments in my activity.  Fragment2 overlaps Fragment1.  And Fragment1 takes up the entire screen.  When the user taps Fragment1 I would like Fragment2 to disappear.  </p>
  
  <p>My question is how can I determine that Fragment1 was tapped? </p>
  
  <p>Fragment1 is mostly made up of a webview which I was thinking I could use its setOnTouchListener but it doesn't seem to ever be called.  </p>
  
  <p>Any suggestions would be appreciated.  </p>
  
  <p>Bradley4</p>
  
  <p>This is how I implemented the onTouchListener: </p>
  
  <p>1) first I implemented "OnTouchListener"</p>
  
  <pre><code>public class Frag_ItemDetail extends Fragment implements OnTouchListener {
  </code></pre>
  
  <p>2)then I overrode onTouch</p>
  
  <pre><code>@Override
  public boolean onTouch(View v, MotionEvent event) {
  Log.d("myclass", "onTouch"); 
  return false;
  }
  </code></pre>
  
  <p>3) then I set the setOnTouchListener to my webview</p>
  
  <pre><code>WebView itemFullDescription = (WebView) v.findViewById(R.id.itemFullDescription);
  WebView.setOnTouchListener(this); 
  </code></pre>
  
  <p>I set the onTouchListenerner on a button and it worked fine.  It just isnt' working for the webview.  </p>