title: Scroll view inside a fragment with tablayout and view pager not scrolling
body: <p>I know this question has been asked many times but i have looked through almost everything but my scroll view inside a fragment is not scrolling at all. I have tried many solutions but none of them are working. Please help.
  Thank you.
  Here are my xml files: 
  Main xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_flame_photometry"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.example.india.chemistry.flame_photometry"&gt;
  
      &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: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/colorPrimary"
                  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"
                  app:tabMode="fixed"
                  app:tabGravity="fill"/&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="match_parent"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"  /&gt;
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Fragment file that contains the scroll view:</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:fillViewport="true"
      tools:context="com.example.india.chemistry.flame_formula"&gt;
  
      &lt;!-- TODO: Update blank fragment layout --&gt;
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:isScrollContainer="false"&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/flameHeader"
              android:text="@string/flameHheader"
              android:textAppearance="@style/TextAppearance.AppCompat"
               /&gt;
  
          &lt;TextView
  
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/flameHeader"
              android:layout_marginTop="34dp"
              android:id="@+id/nacl_100cm"
              android:layout_alignParentRight="true"
              android:layout_alignParentEnd="true"
              android:text="@string/nacl_100cm"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true" /&gt;
  
          &lt;EditText
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:ems="5"
              android:layout_below="@+id/nacl_100cm"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:layout_marginTop="10dp"
              android:id="@+id/nacl_100_input"
              android:inputType="numberSigned|numberDecimal"
              android:hint="(W)g" /&gt;
  
          &lt;TextView
              android:text="@string/nacl_1cm"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/nacl_100_input"
              android:layout_marginTop="10dp"
              android:id="@+id/nacl_1cm"
              android:padding="5dp"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:inputType="textPersonName|numberSigned|numberDecimal"
              android:text=""
  
              android:layout_below="@+id/nacl_100_input"
              android:layout_toRightOf="@id/nacl_1cm"
              android:padding="5dp"
              android:id="@+id/nacl_1cm_result"
              android:layout_alignParentRight="true"
              android:layout_alignParentEnd="true"
              android:layout_alignBottom="@+id/nacl_1cm" /&gt;
  
          &lt;TextView
              android:text="@string/mol_weights_nacl"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/nacl_1cm"
              android:layout_marginTop="10dp"
              android:id="@+id/mol_weights_nacl"
              android:layout_alignParentRight="true"
              android:layout_alignParentEnd="true" /&gt;
  
          &lt;TextView
              android:text="@string/mol_weights_kcl"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/mol_weights_nacl"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:layout_marginTop="10dp"
              android:id="@+id/mol_weights_kcl"
              android:layout_alignParentRight="true"
              android:layout_alignParentEnd="true" /&gt;
  
          &lt;TableLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@+id/mol_weights_kcl"
              android:layout_alignParentLeft="true"
              android:layout_alignParentStart="true"
              android:layout_marginTop="25dp"
              &gt;
  
              &lt;TableRow
                  &gt;
                  &lt;TextView
                      android:id="@+id/srno_header"
                      android:padding="5dp"
                      android:text="Sl.\nno"
                     /&gt;
                  &lt;TextView
                      android:id="@+id/nacl_volume"
                      android:padding="5dp"
                      android:text="@string/nacl_volume"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/weight_sodium"
                      android:padding="5dp"
                      android:text="Sodium \nweight"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/flame_reading_1"
                      android:padding="5dp"
                      android:text="@string/flame_reading"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/weight_sodium_2"
                      android:padding="5dp"
                      android:text="Sodium\nweight"/&gt;
                  &lt;TextView
                      android:id="@+id/flame_reading_2"
                      android:padding="5dp"
                      android:text="@string/flame_reading"/&gt;
              &lt;/TableRow&gt;
              &lt;TableRow&gt;
                  &lt;TextView
                      android:id="@+id/slno1"
                      android:padding="5dp"
                      android:text="1"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/volume1"
                      android:padding="5dp"
                      android:text="@string/volume1"/&gt;
              &lt;/TableRow&gt;
              &lt;TableRow&gt;
                  &lt;TextView
                      android:id="@+id/slno2"
                      android:padding="5dp"
                      android:text="1"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/volume2"
                      android:padding="5dp"
                      android:text="@string/volume2"/&gt;
              &lt;/TableRow&gt;
              &lt;TableRow&gt;
                  &lt;TextView
                      android:id="@+id/slno3"
                      android:padding="5dp"
                      android:text="1"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/volume3"
                      android:padding="5dp"
                      android:text="@string/volume3"/&gt;
              &lt;/TableRow&gt;
              &lt;TableRow&gt;
                  &lt;TextView
                      android:id="@+id/slno4"
                      android:padding="5dp"
                      android:text="1"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/volume4"
                      android:padding="5dp"
                      android:text="@string/volume4"/&gt;
  
              &lt;/TableRow&gt;
              &lt;TableRow&gt;
                  &lt;TextView
                      android:id="@+id/slno5"
                      android:padding="5dp"
                      android:text="1"
                      /&gt;
                  &lt;TextView
                      android:id="@+id/volume5"
                      android:padding="5dp"
                      android:text="@string/volume5"/&gt;
              &lt;/TableRow&gt;
  
  
          &lt;/TableLayout&gt;
      &lt;/RelativeLayout&gt;
  
  
  &lt;/ScrollView&gt;
  </code></pre>