title: set two radio buttons in one row then next two radio is on second row and so on
body: <p>i want to set 2 two radiobuttons one row , then next 2 radiobuttons on second row dynamically(Programmatically) I am new to android any body have idea or sample code of it. What i have do is:</p>
  
  <pre><code>RadioGroup radiogroup = (RadioGroup)findViewById(R.id.RadioGroup01);
  for(int i=0;i&lt;10;i++) {
      RadioButton rdbtn = new RadioButton(this);
      rdbtn.setId(i);
      rdbtn.setText("test");
  
      LinearLayout ll = new LinearLayout(this);
      ll.setOrientation(LinearLayout.HORIZONTAL);
  
      ll.addView(rdbtn);
      radiogroup.addView(rdbtn);
      ll.addView(radiogroup);
      //i%2 == 0
  }
  </code></pre>