Hey Phyll,
Thanks for your quick reply. I have seen your code. That have static Radio Buttons. But i need to create run time in one Single Radio Group. Mns, sometimes i have to create 5radio buttons, some times i have to create 7 that also one row want to align two buttons. For that sample only i have given lik,
Radio1 Radio2
Radio3 Radio4
: :
: :
: :
Radio n Radio m
Below is my code.,
- Code: Select all
RadioGroup rGroup = (RadioGroup) findViewById(R.id.radiogroup);
for (int i = 0; i < 5; i++) {
RadioButton rb = new RadioButton(this);
rb.setText("Radio"+i);
rb.setOnCheckedChangeListener(this);
rGroup.addView(rb);
}
Here radio buttons are aligned vertically. But i need that above mentioned sample.