title: TabLayout+ViewPager inside ScrollView
body: <p>I'm trying to make this page scroll down but right now only the content inside <code>ViewPager</code> is scrolling not the whole page. I want to make the whole page scroll down from top, but right now it only scrolls the <code>ListView</code>s inside <code>ViewPager</code>.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:id="@+id/asa"
  android:scrollbars="vertical"
  android:layout_height="match_parent"
  android:fillViewport="true"&gt;
  &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="fill_parent"
  xmlns:custom="http://schemas.android.com/apk/res-auto"
  xmlns:mstb="http://schemas.android.com/apk/res-auto"
  
  tools:context="geob.com.testjson.Profile"&gt;
  &lt;ImageView
      android:id="@+id/cover12"
      android:src="@drawable/asc"
      android:layout_width="fill_parent"
      android:layout_height="180dp"
      android:scaleType="fitXY" /&gt;
  
  &lt;ImageView
      android:layout_width="60dp"
      android:layout_height="60dp"
      android:id="@+id/ddd"
      android:src="@android:drawable/star_big_on"
      android:layout_marginBottom="62dp"
  
      android:layout_above="@+id/tab_layout"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Taaran"
      android:textColor="@android:color/white"
      android:id="@+id/dpname"
      android:layout_above="@+id/dpuname"
      android:layout_alignLeft="@+id/ddd" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="\@taaran"
      android:textColor="@android:color/white"
      android:id="@+id/dpuname"
      android:layout_above="@+id/tab_layout"
      android:layout_alignLeft="@+id/ddd"
      android:layout_alignStart="@+id/ddd"
      android:layout_marginBottom="32dp" /&gt;
  
  
  &lt;!-- &lt;android.support.design.widget.TabLayout
      android:id="@+id/tabLayout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="?attr/colorPrimary"
      android:minHeight="?attr/actionBarSize"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
      android:layout_below="@+id/cover"
      android:layout_alignLeft="@+id/cover"
      android:layout_alignStart="@+id/cover" /&gt; --&gt;
  
  &lt;!-- View pager to swipe views --&gt;
  &lt;!-- &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_width="match_parent"
      android:layout_height="fill_parent"/&gt;  --&gt;
  &lt;!--&lt;org.honorato.multistatetogglebutton.MultiStateToggleButton
      android:id="@+id/mstb_multi_id"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      mstb:values="@array/planets_array"
      mstb:mstbPrimaryColor="@android:color/holo_blue_dark"
      mstb:mstbSecondaryColor="@color/gray_very_light"
      android:layout_below="@+id/cover"
  
       /&gt;--&gt;
  &lt;android.support.design.widget.TabLayout
      android:id="@+id/tab_layout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="?attr/colorPrimary"
      android:elevation="6dp"
      android:minHeight="?attr/actionBarSize"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
      android:layout_below="@+id/cover12"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_width="match_parent"
      android:layout_height="fill_parent"
      android:layout_below="@id/tab_layout"/&gt;
  
  &lt;ListView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/l12"
      android:layout_below="@+id/tab_layout"
       /&gt;
  &lt;com.ashokvarma.bottomnavigation.BottomNavigationBar
      android:layout_gravity="bottom"
      android:id="@+id/bottom_navigation_bar3"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;Button
      style="?android:attr/buttonStyleSmall"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Follow"
      android:id="@+id/followButton"
      android:layout_above="@+id/tab_layout"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vOdHz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vOdHz.png" alt="enter image description here"></a></p>