Reputation: 23615
i have my controls in a vertical LinearLayout. All my controls are place below each other.
What i want to do is place a radio group (with 2 radio buttons) on one 'line'
How can i do that?
I tried wrapping it in a horizontal LinearLayout, but that didn't work out
Upvotes: 12
Views: 19349
Reputation: 664
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="No Return"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Return"/>
</RadioGroup>
Upvotes: 3
Reputation: 31846
Use the android:orientation="horizontal"
-attribute of the RadioGroup.
Upvotes: 52