title: CoordinatorLayout not working properly with 2 child layouts
body: <p>I have a CoordinatorLayout at root which has AppBarLayout that contains a LinearLayout that has 2 LinearLayouts as child. Let's call these child layouts A and B. I can't have contents of both A and B show at the same time. Contents of A show and B don't and when I delete contents of A only then contents of B show and vice versa. This is what is looks like when I have contents of both A and B inside the LinearLayout container.</p>
  
  <p><a href="https://i.stack.imgur.com/cxB8P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cxB8P.png" alt="enter image description here"></a></p>
  
  <p>A and B both have Textviews but only TextView of A shows and B doesn't.</p>
  
  <p>Here's the code for the layout:</p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"&gt;
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:fitsSystemWindows="true"
          android:theme="@style/Theme.AppCompat.Light.NoActionBar"&gt;
          &lt;LinearLayout
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="#ffff"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"&gt;
              &lt;LinearLayout
                  android:orientation="vertical"
                  android:minWidth="25px"
                  android:minHeight="25px"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/A"
                  android:padding="10dp"&gt;
                  &lt;TextView
                      android:text="Large Text"
                      android:textAppearance="?android:attr/textAppearanceLarge"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:id="@+id/title"
                      android:textColor="#000000"
                      android:fontFamily="sans-serif-light" /&gt;
              &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:orientation="horizontal"
                  android:minWidth="25px"
                  android:minHeight="25px"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/B"
                  android:background="@drawable/border"
                  android:padding="10dp"&gt;
                  &lt;TextView
                      android:text="Large Text"
                      android:textAppearance="?android:attr/textAppearanceLarge"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:id="@+id/textview"
                      android:textColor="#000000"
                      android:fontFamily="sans-serif-light" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/rv"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>I have tried everything but I can't figure out what is wrong. The scroll behavior works fine but I can't see the contents of both A and B.
   Can anyone help?</p>