title: Android TableLayout inside ScrollView
body: <p>I want both the ScrollView TableLayout to have same height as the screen, but whyy table is taken only half of the screen, whereas ScrollView is taking full screen as intended. </p>
  
  <p>I tried changing height of table and rows as wrap_content, but showing same result. Also changing height of table as fixed height (e.g. 900dp) is not working as well. Even the last row height is not showing full rating bar. Seems like table is forced to have that specific width.</p>
  
  <p>If I delete ScrollView, it works just fine.</p>
  
  <p>Can anyone please help.</p>
  
  <pre><code>&lt;ScrollView 
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:background="@drawable/border"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context=".EditEntry" &gt;
      &lt;TableLayout
          android:id="@+id/tableLayout1"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
          &lt;TableRow
              android:id="@+id/tr3a"
              android:padding="2.5dp"
              android:background="@color/col1"
              android:gravity="center_vertical"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
          android:layout_weight="1" &gt;
  
              &lt;TextView
                  android:id="@+id/lab_bookname"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="@string/bookname" /&gt;
  
              &lt;EditText
                  android:id="@+id/bookname"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:hint="@string/definputtext2" /&gt;
  
          &lt;/TableRow&gt;
  
          &lt;TableRow
              android:id="@+id/tr3"
              android:padding="2.5dp"
              android:background="@color/col2"
              android:gravity="center_vertical"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
          android:layout_weight="1" &gt;
              &lt;TextView
                  android:id="@+id/lab_printname"
              android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="@string/print_name" /&gt;
  
              &lt;EditText
                  android:id="@+id/printname"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:hint="@string/definputtext2" /&gt;
  
          &lt;/TableRow&gt;
          ......................
          ......................
          ......................
      &lt;/TableLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ELf7x.png" alt="enter image description here"></p>