1

I am trying to align RadioButtons inside RadioGroup in square shape. Like two radio buttons in one row and two more radio buttons below them in a second row. I achived it by putting two seperate linearlayouts in RadioGroup but then it is impossible to access to the RadioButtons from RadioGroup's id. How can i do this?

garenyondem
  • 541
  • 9
  • 24
  • You Can find the Answer in [this][1]link [1]: http://stackoverflow.com/questions/10425569/radiogroup-with-two-columns-which-have-ten-radiobuttons – MathanG Dec 17 '14 at 09:14
  • I could do this by setting on checkchanged listener on each radio Button too. But i want to know if there is any trick i can do in xml to make that possible. – garenyondem Dec 17 '14 at 09:18
  • I dont think such a trick possible – MathanG Dec 17 '14 at 09:19
  • Possible duplicate of [RadioGroup with two columns which have ten RadioButtons](https://stackoverflow.com/questions/10425569/radiogroup-with-two-columns-which-have-ten-radiobuttons) – Massimiliano Kraus May 24 '17 at 09:17

1 Answers1

1

I found something which might me helpful here - if you want to use Linear Layout.

You can also use Grid Layout but from what I know, you have to extend GridLayout or RadioGroup. This issue was addressed in a lot of questions here on Stack Overflow, try searching for some. Please post some code after reading, maybe we could help more then.

wtrmeln
  • 121
  • 11