title: Android Tab Layout is not showing the view
body: <p>Hi I have the following issue , when pressing a tab icon the view is not shown, i can see the class is being loaded. I can see the that in the console log. I believe the issue is related the the xml as i have moved the relative layout main_content below the view pager and when the icon is pressed in the tab layout, the tab fragment content is shown but the main content views don't attach then which is a problem.</p>
  
  <p><strong>My Layout:</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.CoordinatorLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;android.support.design.widget.AppBarLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  android:background="?attr/colorPrimaryDark"
                  app:layout_scrollFlags="scroll|enterAlways"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
  
              &lt;android.support.design.widget.TabLayout
                  android:id="@+id/tabs"
                  android:layout_width="match_parent"
                  android:layout_height="@dimen/custom_tab_layout_height"
                  app:tabGravity="fill"
                  app:tabMode="fixed" /&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/main_content"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
  
              &lt;/RelativeLayout&gt;
  
  
              &lt;android.support.v4.view.ViewPager
                  android:id="@+id/viewpager"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
  
              &lt;/android.support.v4.view.ViewPager&gt;
  
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  
      &lt;RelativeLayout
          android:id="@+id/drawer_pane"
          android:layout_width="280dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"&gt;
  
          &lt;!-- Profile box --&gt;
  
          &lt;RelativeLayout
              android:id="@+id/profile_box"
              android:layout_width="match_parent"
              android:layout_height="100dp"
              android:background="@color/material_blue_grey_800"
              android:gravity="center_vertical"&gt;
  
              &lt;ImageView
                  android:id="@+id/icon"
                  android:layout_width="50dp"
                  android:layout_height="50dp"
                  android:layout_marginLeft="10dp"
                  android:background="@drawable/ic_mail_black_24dp" /&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="5dp"
                  android:layout_toRightOf="@+id/icon"
                  android:orientation="vertical"&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="Phong"
                      android:textColor="#fff"
                      android:textSize="18sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="PTIT HCM"
                      android:textColor="#fff"
                      android:textSize="16sp" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/RelativeLayout&gt;
  
          &lt;!-- Navigation Listview --&gt;
  
          &lt;ListView
              android:id="@+id/nav_list"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_below="@+id/profile_box"
              android:background="#ffffff"
              android:choiceMode="singleChoice"&gt;
  
          &lt;/ListView&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>