title: Android ScrollView with RelativeLayout
body: <p>I have a fragment with two RelativeLayout, one inside the other. This fragment is inside a tab. I want that the internal layout(layoutInternal) is scrollable, but with the following code does not work. I create the view object into the layoutInternal dinamically. Where is my mistake?</p>
  
  <p><code></p>
  
  <pre><code>&lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/layoutExsternal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
       &lt;ScrollView 
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:fillViewport="true" 
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginBottom="@dimen/fragmentHall_10dp_margin"
          android:layout_marginTop="@dimen/fragmentHall_10dp_margin"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/layoutInternal"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/ScrollView&gt;   
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></code></p>
  
  <p>The following code is where i insert the view object (table) inside the intenalLayout.</p>
  
  <pre><code>    while (iteratorTables.hasNext()) {
          [...] //Here i calculate the dimension and coordinates
          b_table = new ButtonTable(SelzApplication.getAppContext(),tableMap.getValue(), widthTable, heightTable);
  
          b_table.setX(Math.round((tableMap.getValue().getX())* Xratio));
          b_table.setY(Math.round((tableMap.getValue().getY())* Yratio));
  
          //add Touch Listeners to the button
          b_table.setOnLongClickListener(new OnLongTuchDragDrop());   
          b_table.setOnClickListener(new TableOnClick()); 
  
  
          layoutInternal.addView(b_table, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
      }
  </code></pre>
  
  <p>This is the screenshot of my app. 
  <img src="https://i.stack.imgur.com/IwJaq.png" alt="enter image description here"></p>