Android: Radio button alignment 2 x 2 in one radiogroup -


i have 4 radio buttons , can align them vertically , horizontally alignment this:

a b c d  

and

a b c d 

but want kind alignment:

a b c d 

is there possible way this?, can't find right tutorials or examples.

use linearlayout within radiogroup this:

<radiogroup     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/radiogroup">      <linearlayout         android:layout_width="wrap_content"         android:layout_height="wrap_content">         <radiobutton             android:id="@+id/radiobutton2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="new radiobutton"              android:layout_marginleft="5dp"/>          <radiobutton             android:id="@+id/radiobutton"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="new radiobutton"              android:layout_marginright="5dp"    />     </linearlayout>     <linearlayout         android:layout_width="wrap_content"         android:layout_height="wrap_content">         <radiobutton             android:id="@+id/radiobutton4"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="new radiobutton"              android:layout_marginleft="5dp"/>          <radiobutton             android:id="@+id/radiobutton3"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="new radiobutton"              android:layout_marginright="5dp"/>     </linearlayout> </radiogroup> 

Comments