title: how add row of buttons dynamically
body: <p>i am having a big problem with adding buttons_dynamically with java code<br>
  i want add buttons in my app so the number depends on the chars of <strong>answer</strong><br>
  if the answer contains <strong>4 chars</strong> i should show 4 buttons , the below code is only to add one button i want to add more buttons  i need help  </p>
  
  <p><strong>main.java</strong>  </p>
  
  <pre><code>  TableRow tr= new TableRow(this);
          final Button btn = new Button(this);
         TableRow.LayoutParams tl= new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT
                 , TableRow.LayoutParams.WRAP_CONTENT);
  
          btn.setBackgroundColor(Color.GRAY);
               btn.setText("h");
               tl.setMargins(10,10,0,0);
            btn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
             btn.setText(" ");
             }
           });
  
  
           tr.addView(btn,tl);
  
           setContentView(tr);
  </code></pre>
  
  <p>i</p>