Search code examples
androidradio-group

RadioGroup : Horizontal layout and Span multiple lines


Android 2.3.3

I have around 5 RadioButtons in a RadioGroup. I don't want the orientation to be vertical as it takes most of the available space. If i keep the orientation to be horizontal, only 2 or 3 will be visible and the rest will disappear as the screen's size doesn't fit them all horizontally.

Can i span these radio buttons in more than 1 line, with the horizontal layout.


Solution

  • You can achieve this by wrapping your RadioGroup in a HorizontalScrollView, and the next radio buttons will appear when the user scrolls to the right.