Note that there are some explanatory texts on larger screens.

plurals
  1. POArranging Radio button inside tablelayout Android
    text
    copied!<p>I want to arrange radio buttons in table layout in multiple rows and columns, the controls are arranged using below code but could not associate in the same radiobutton group.</p> <p>Can you please help, below is the code I tried..</p> <pre><code>&lt;TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;RadioGroup android:id="@+id/radioLang1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:dividerPadding="0dp" android:orientation="vertical" &gt; &lt;TableRow&gt; &lt;RadioButton android:id="@+id/radioEnglish1" android:layout_width="wrap_content" android:layout_height="20dp" android:checked="true" android:onClick="onRadioButtonClicked" android:text="@string/lang1" android:textColor="@android:color/black" android:textSize="12sp" /&gt; &lt;RadioButton android:id="@+id/radioTransliteration" android:layout_width="wrap_content" android:layout_height="20dp" android:checked="true" android:onClick="onRadioButtonClicked" android:text="Punjabi Transliteration" android:textColor="@android:color/black" android:textSize="12sp" /&gt; &lt;/TableRow&gt; &lt;TableRow&gt; &lt;RadioButton android:id="@+id/radioPunjabi1" android:layout_width="wrap_content" android:layout_height="20dp" android:onClick="onRadioButtonClicked" android:text="Punjabi Vyakhya(Meaning)" android:textColor="@android:color/black" android:textSize="12sp" /&gt; &lt;RadioButton android:id="@+id/radioHindi" android:layout_width="wrap_content" android:layout_height="20dp" android:onClick="onRadioButtonClicked" android:text="Hindi Mein Padhiye" android:textColor="@android:color/black" android:textSize="12sp" /&gt; &lt;/TableRow&gt; &lt;RadioButton android:id="@+id/radioEnglishTranslation1" android:layout_width="wrap_content" android:layout_height="20dp" android:onClick="onRadioButtonClicked" android:text="@string/eng_translate" android:textColor="@android:color/black" android:textSize="12sp" /&gt; &lt;/RadioGroup&gt; &lt;/TableLayout&gt; </code></pre> <p>Thanks</p> <p>Amandeep</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload