title: Populating TableRow dynamically not working
body: <p>I was having some problem when trying to populate the <code>TableRow</code> dynamically. What I am trying to do is when export button on click, I compile the header, footer and content then once they are done, I proceed to export as PDF.</p>
  <p>I populated my <code>TableLayout</code> with the following code in compileContent():</p>
  <pre><code>for (int i = 0; i &lt; allCalibrationList.size(); i++) {
          System.out.println(&quot;DATA&quot; + allCalibrationList.get(i).getCalibrationName());
          TableRow row = (TableRow) getLayoutInflater().inflate(R.layout.template_calibration_report_summary_item, summaryTableLayout, false);
          TextView textCol1 = row.findViewById(R.id.row_col1);
          TextView textCol2 = row.findViewById(R.id.row_col2);
  
          textCol1.setText(allCalibrationList.get(i).getCalibrationName());
          textCol2.setText(getString(R.string.report_not_calibrated_label));
          
          summaryTableLayout.addView(row);
      }
      contentFinished = true;
  </code></pre>
  <p>When my export button on click:</p>
  <pre><code>@Click(R.id.buttonExport)
  void buttonExportClicked(View view) {
      FileOutputStream fileOutputStream;
      try {
          while (!headerFinished &amp;&amp; !footerFinished &amp;&amp; !contentFinished) {
              compileHeader();
              compileContent();
              compileFooter();
          }
          // code to generate pdf
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  <p>The problem is, when I first click the export button, it went in the <code>compileContent()</code> and from the printed message I put in the for loop, I managed to get the data printed out. However, the <code>tableRow</code> is not showing in the exported PDF. The <code>tableRow</code> will only show when the export button is clicked the second time.</p>
  <p>However, when I click the export button for the second time, it does not went into the <code>compileContent()</code> as the printed message I set in for loop is not printing. Why is it so? Why is the <code>tableRow</code> is not showing when there is data?</p>