title: android TableLayout adding rows dynamically adds only the last row
body: <p>after reading tens of threads on StackOverflow.
  I'm trying to add dynamically rows to a table-layout. 
  The problem is, the only one row is added dynamically, and it is spanning on all of the page.
  This is my code:</p>
  
  <pre><code>package com.example.trashproject;
  
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.view.View;
  import android.widget.TableLayout;
  import android.widget.TableRow;
  import android.widget.TableRow.LayoutParams;
  
  public class MainActivity extends FragmentActivity{
  
  
      private static final int ROWS =2;
      private static final int COLS = 10;
      private static final String TAG = null;
      private TableLayout mTable;
      private View[][] mCircles;
      private boolean[][] mData;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          makeTable();
  
      }
  
      private void makeTable() {
          mTable = (TableLayout) findViewById(R.id.table);
  
          TableRow.LayoutParams rowParams = new TableRow.LayoutParams();
          rowParams.width = LayoutParams.WRAP_CONTENT;
          rowParams.height = LayoutParams.WRAP_CONTENT;
          mCircles = new View[ROWS][COLS];
          TableRow row;
          for (int i = 0; i &lt; ROWS; i++) {
              row = new TableRow(this);
              row.setLayoutParams(rowParams);
              for (int j = 0; j &lt; COLS; j++) {
                  mCircles[i][j] = new View(this);
                  mCircles[i][j].setBackgroundResource(R.drawable.small_circle);
                  row.addView(mCircles[i][j]);
              }
              mTable.addView(row);
          }
      }
  </code></pre>
  
  <p>activity_main.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/LinearLayout1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;TableLayout
          android:id="@+id/table"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
      &lt;TableRow &gt;
          &lt;TextView 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="TEXT"/&gt;
      &lt;/TableRow&gt;
      &lt;TableRow &gt;
          &lt;TextView 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="TEXT"/&gt;
      &lt;/TableRow&gt;
      &lt;/TableLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>calendar_month_grid.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;View xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/view1"
      android:layout_width="wrap_content"
      android:layout_height="1dp"
      /&gt;
  </code></pre>
  
  <p>small_circle.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
      android:shape="oval" &gt;
      &lt;size android:width="15dp"
          android:height="1dp"/&gt;
      &lt;solid android:color="@android:color/holo_green_light"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>Your help appreciated...</p>