title: coordinatorlayout not scrolling with swipeRefreshlayout
body: <p>I have added coordinatorlayout+viewpager+TabLayout and have added three tabs with viewpager but scrolling only works with first tab(recent)</p>
  
  <p>not working with two tabs 1. contact,2.setting</p>
  
  <p>see all codes only xml code posted here as only needed</p>
  
  <p><strong>homeactivity xml(where three fragment get attached)</strong></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"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/main_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".activities.HomeActivity"&gt;
  
  
  &lt;android.support.design.widget.AppBarLayout
      android:id="@+id/appBarLayout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      app:elevation="6dp"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          android:layout_alignParentTop="true"
          android:background="?attr/colorPrimary"
          android:minHeight="?attr/actionBarSize"
  
  android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
          app:elevation="0dp"
          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="wrap_content"
          android:layout_below="@+id/toolbar"
          android:background="?attr/colorPrimary"
          android:minHeight="?attr/actionBarSize"
          app:elevation="0dp"
          app:tabGravity="fill"
          app:tabIndicatorColor="@color/white"
          app:tabMode="fixed"
          app:tabSelectedTextColor="#ffffff"
          app:tabTextColor="@color/white" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/viewpager"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_below="@+id/tab_layout"
      app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p><strong>contact_fragment.xml(with swiperefreshlayout)</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.SwipeRefreshLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/swipe_refresh_layout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
      &lt;!-- place your view here --&gt;
  
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/recyclerview_registered"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:scrollbars="vertical" /&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dp"
              android:layout_marginTop="2dp"
              android:background="@color/black" /&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/recyclerview_invite"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="2dp"
              android:scrollbars="vertical" /&gt;
      &lt;/LinearLayout&gt;
  
  
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p><strong>setting_fragment.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/recyclerview"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:scrollbars="vertical" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>HOMEACTIVITY CODE</strong></p>
  
  <pre><code>public void BindView() {
      appBarLayout = (AppBarLayout) findViewById(R.id.appBarLayout);
      toolbar = (Toolbar) findViewById(R.id.toolbar);
      toolbar.setTitle("RECENT");
      setSupportActionBar(toolbar);
  
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
      viewPager = (ViewPager) findViewById(R.id.viewpager);
      setupViewPager(viewPager);
      TabLayout tabLayout;
      tabLayout = (TabLayout) findViewById(R.id.tabs);
      tabLayout.setupWithViewPager(viewPager);
      tabLayout.setSelected(true);
      viewPager.setCurrentItem(0);
  
  
      viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
  
      tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
          @Override
          public void onTabSelected(TabLayout.Tab tab) {
              switch (tab.getPosition()) {
                  case 0:
                      viewPager.setCurrentItem(0);
                      toolbar.setTitle("RECENT");
                      break;
                  case 1:
                      viewPager.setCurrentItem(1);
                      toolbar.setTitle("CONTACT");
                      break;
                  case 2:
                      viewPager.setCurrentItem(2);
                      toolbar.setTitle("SETTING");
                      break;
                  default:
                      viewPager.setCurrentItem(0);
                      toolbar.setTitle("RECENT");
                      break;
              }
              /*if (viewPager.getCurrentItem() == 0) {
                  toolbar.setTitle(viewPager.getCurrentItem());
              }*/
          }
  
          @Override
          public void onTabUnselected(TabLayout.Tab tab) {
  
          }
  
          @Override
          public void onTabReselected(TabLayout.Tab tab) {
  
          }
      });
      viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
          @Override
          public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
  
          }
  
          @Override
          public void onPageSelected(int position) {
              if (viewPager.getCurrentItem() == 0) {
                  toolbar.setTitle("RECENT");
              }
  
          }
  
          @Override
          public void onPageScrollStateChanged(int state) {
  
          }
      });
  
  
  }
  
  private void setupViewPager(ViewPager viewPager) {
      ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
      adapter.addFragment(new RecentFragment(), "RECENT");
      adapter.addFragment(new ContactFragment(), "CONTACT");
      adapter.addFragment(new Settingfragemnt(), "SETTING");
      viewPager.setAdapter(adapter);
  
  }
  
  class ViewPagerAdapter extends FragmentPagerAdapter {
      private final List&lt;Fragment&gt; mFragmentList = new ArrayList&lt;&gt;();
      private final List&lt;String&gt; mFragmentTitleList = new ArrayList&lt;&gt;();
  
      public ViewPagerAdapter(FragmentManager manager) {
          super(manager);
      }
  
      @Override
      public Fragment getItem(int position) {
  
          return mFragmentList.get(position);
      }
  
      @Override
      public int getCount() {
          return mFragmentList.size();
      }
  
      public void addFragment(Fragment fragment, String title) {
          mFragmentList.add(fragment);
          mFragmentTitleList.add(title);
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          return mFragmentTitleList.get(position);
      }
  }
  </code></pre>