android - add radio buttons inside LinearLayout to a RadioGroup -
i have 4 radio buttons want group in radio group , display each 2 of them in row, used linearlayout radio buttons inside seem ignore inside radiogroup( wan select more 1 radio button).
<radiogroup android:id="@+id/radiogroup1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignright="@+id/linearlayout1" android:layout_below="@+id/linearlayout1" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > <radiobutton android:id="@+id/radio1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="radiobutton" /> <radiobutton android:id="@+id/radio2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="radiobutton" /> </linearlayout> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" > <radiobutton android:id="@+id/radio3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="radiobutton" /> <radiobutton android:id="@+id/radio4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="radiobutton" /> </linearlayout> </linearlayout> </radiogroup>
so there way that?
you not able have multyply selection in radiogroup , can use checkboxes or should not using radiogroup
Comments
Post a Comment