I have a radioGroup and four radiobutton, I just Want to arrange these radiobuttons randomly whenever the program is running.
Say i have radio buttons r1,r2,r3,r4 and a radiogroup. I want sometimes these radiobuttons arranged like r2,r3,r1,r4 (vertically) and some times r1,r2,r4,r3 and so on...
How can i Implement this?
For implementing random
RadioButton
random sequence following code will help you:In your
layout.xml
file addRadioGroup
:And in your java file: