title: Android: Get the size of the Body Layout Dynamically
body: <p>I want to get the height/width of the Middle(Body) layout in onCreate() method.</p>
  
  <p>My main.xml is :</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/rl_Main"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/main_bg11" &gt;
  
  &lt;RelativeLayout
      android:id="@+id/rl_title"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true" &gt;
  
      &lt;include layout="@layout/title" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;ScrollView
      android:id="@+id/svtest"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_above="@+id/rl_music_controller"
      android:layout_below="@+id/rl_title" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/rl12"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:gravity="center" &gt;
  
          &lt;TableLayout
              android:id="@+id/tbl_vandana"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_centerHorizontal="true"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:gravity="center_horizontal"
              android:paddingTop="30dp" &gt;
          &lt;/TableLayout&gt;
      &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  
  &lt;RelativeLayout
      android:id="@+id/rl_music_controller"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true" &gt;
  
      &lt;include layout="@layout/controller" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am adding Textview dynamically in TableLayout.
  id : </p>
  
  <ol>
  <li><p>rl_title is my title layout</p></li>
  <li><p>svtest is my Middle(Body) Content.</p></li>
  <li><p>rl_music_controller is my footer layout.</p></li>
  </ol>
  
  <p>I am referring <a href="https://stackoverflow.com/questions/8784616/android-get-screen-size-for-the-root-layout-only">this link</a>. But i don't understand exactly what i do?</p>