title: Having difficulty in getting dynamically added table rows to show up
body: <p>I am working on a screen that basically shows questions and answers in a grid format and I am putting them all into table rows dynamically.  The problem I am having is that once I put in the first row (the header), the rest of the rows in the table do not show up.  I first add the headers.  This shows up.   </p>
  
  <pre><code> protected void setupTableHeaders() {
      TableRow tableRow = getNewTableRow();
      tableRow.setTag(header);
      TextView textView = new TextView(this);
      GlobalVars.setupText(this,textView,32320); //Event
      textView.setTextColor(R.color.black);
  
  
      LayoutParams params = new LayoutParams(0,LayoutParams.WRAP_CONTENT,3.0f);
      params.setMarginStart(50);
  
      tableRow.addView(textView,params);
      tableRow.addView(getNewDivider(),(new LayoutParams(0,LayoutParams.WRAP_CONTENT,.1f)));
  
      Iterator it = mapQuestions.entrySet().iterator();
      //first get all the answers
      if (it.hasNext()) {
          Map.Entry pair = (Map.Entry) it.next();
          HolderQuestion holderQuestion = mapQuestions.get(pair.getKey());
          //assume all answers sets for all questions on this screen are the same.
          int i = 0;
          for (HolderAnswer answer : holderQuestion.getListAnswers()) {
              TextView textViewHeader = new TextView(this);
              textViewHeader.setTextColor(R.color.black);
              GlobalVars.setupText(this, textViewHeader, answer.getTextID());
              tableRow.addView(textViewHeader, (new LayoutParams(0, LayoutParams.WRAP_CONTENT, .5f)));
              if (i &lt; holderQuestion.getListAnswers().size() - 1) {
                  tableRow.addView(getNewDivider(), (new LayoutParams(0, LayoutParams.WRAP_CONTENT, .1f)));
              }
              i++;
  
          }
      }
      table1.addView(tableRow);
  
  }
  </code></pre>
  
  <p>Then I add the questions and answers, which do not show up: </p>
  
  <pre><code>protected void setupRadioButtonAnswers() {
  
  
      for (int i=0;i&lt;holderQuestionMultis.size();i++) { //assume this is populated correctly
          TableRow tableRow = getNewTableRow();
          tableRow.setTag(answerRow);
          TextView textView = new TextView(this);
          textView.setTextColor(R.color.black);
          GlobalVars.setupText(this,textView,holderQuestionMultis.get(i).getHolderQuestion().getTextID());
          textView.setTag(textCell);
          textView.setVisibility(View.VISIBLE);
          LayoutParams params = new LayoutParams(0,LayoutParams.WRAP_CONTENT,3.0f);
          params.leftMargin = 50;
          tableRow.addView(textView,params);
          tableRow.addView(getNewDivider(),(new LayoutParams(0,LayoutParams.WRAP_CONTENT,.1f)));
          for (int j=0;j&lt;holderQuestionMultis.get(i).getRadioButtons().size();j++) {
              RadioButton radioButton = holderQuestionMultis.get(i).getRadioButtons().get(j);
              radioButton.setVisibility(View.VISIBLE);
              tableRow.addView(radioButton,(new LayoutParams(0,LayoutParams.WRAP_CONTENT,.5f)));
              if (j&lt; holderQuestionMultis.size()-1) {
                  tableRow.addView(getNewDivider(),(new LayoutParams(0,LayoutParams.WRAP_CONTENT,.1f)));
              }
          }
          tableRow.setVisibility(View.VISIBLE);
          table1.addView(tableRow);
      }
  
  }
  </code></pre>
  
  <p>And the two methods which get the radioButtons and table rows: </p>
  
  <pre><code>// table elements
  protected TableRow getNewTableRow() {
      TableRow tableRow = new TableRow(this);
      TableLayout.LayoutParams tlparams = new TableLayout.LayoutParams(
              TableLayout.LayoutParams.MATCH_PARENT,
              TableLayout.LayoutParams.WRAP_CONTENT);
      tableRow.setBackground(getResources().getDrawable(R.drawable.border_table_multi_grid));
      tableRow.setLayoutParams(tlparams);
      return tableRow;
  
  }
  
  protected RadioButton getRadioButton() {
      RadioButton radioButton = new RadioButton(this);
      radioButton.setBackground(getResources().getDrawable(R.drawable.radio_button_multigrid));
      //radioButton.setButtonDrawable(R.color.transparent);
      TableRow.LayoutParams params = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);
      radioButton.setLayoutParams(params);
      return radioButton;
  }
  </code></pre>
  
  <p>The tablelayout xml: </p>
  
  <pre><code>  &lt;TableLayout
      android:id="@+id/table"
      android:layout_width="match_parent"
      android:layout_height="300dp"
      android:orientation="horizontal"
      android:layout_above="@+id/viewSpacer"
      android:layout_below="@+id/lblSubQuestionText"
      android:layout_marginBottom="15dp"
      android:layout_marginRight="15dp"
      android:layout_marginLeft="15dp"
      android:layout_marginTop="15dp"
  
      android:background="@drawable/border_table_multi_grid"&gt;
  </code></pre>
  
  <p>What am I missing?  Is the first table header row covering up the other rows?  Why do they not appear?  </p>