title: Child fragment triggers onClick of parent
body: <p>I'm using nested fragments, passing from one to the other with code</p>
  
  <pre><code>ImageView search = (ImageView) root.findViewById(R.id.search);
      search.setOnClickListener(new OnClickListener(){
          @Override
          public void onClick(View arg0) {
              FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
              transaction.addToBackStack(null);
              transaction.replace(R.id.parent, ChildFragment.newInstance());
              transaction.commit();               
          }           
      });
  </code></pre>
  
  <p>However sometimes it happens that from the child fragment I can still click items of the parent fragment, even if they are invisible (covered by the child fragment). In particular, this happens when the child has a simple layout of type</p>
  
  <pre><code>&lt;RelativeLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"  
      android:background="#FFF0D1"
      android:id="@+id/child"&gt;
  
  ...some stuff...    
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>but it does NOT happen when I use the nested layout</p>
  
  <pre><code>&lt;RelativeLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"  
      android:background="#FFF0D1"
      android:id="@+id/child"&gt;
  
  &lt;ScrollView
      android:id="@+id/scr"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_alignParentTop="true"
      android:padding="10dp"&gt;
  
  &lt;RelativeLayout 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content" &gt;
  
  ...same stuff...
  
  &lt;/RelativeLayout&gt;
  
  &lt;/ScrollView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Anybody knows why this happens?</p>