2

I created a dynamic radio group. By default it is like this:

(o) XX  
(o) XX  
(o) XX 

How can I achieve the buttons to be the following dynamically:

(o) X (o) X (o) X 
halex
  • 16,253
  • 5
  • 58
  • 67

1 Answers1

2

See developers site:

http://developer.android.com/reference/android/widget/LinearLayout.html#setOrientation(int)

setOrientation(RadioGroup.HORIZONTAL);

Just make sure your RadioButton width is wrap_content.

Similar question (not dynamic): Manage Layout Inside a Horizontal Oriented Radiogroup

Community
  • 1
  • 1
Rolf ツ
  • 8,611
  • 6
  • 47
  • 72