title: Multiple Radio Buttons Get selected
body: <p>I have made a radiogroup and inside it I have made two linear layouts and in each linear layout I have added two radio buttons.</p>
  
  <p>But the problem is when I run the app multiple radio buttons get selected <strong>i.e. they aren't acting mutually exclusive</strong>.</p>
  
  <p>Following is my XML file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"    android:id="@+id/activity_simple_maths_game"
      android:layout_width="match_parent"    android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"    android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"    android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.example.root.mysimplemathsgame.SimpleMathsGame"  android:background="#000"
      android:orientation="vertical"    android:baselineAligned="false"&gt;
  &lt;LinearLayout
      android:layout_weight="0.4"                android:orientation="horizontal"
      android:layout_width="match_parent"        android:layout_height="0dp"&gt;
  
  &lt;TextView
      android:text="@string/mytext"                    android:id="@+id/tvText"
      android:layout_width="wrap_content"                     android:layout_height="0dp"
      android:layout_weight="0.87"                            android:textColor="#fff"
      android:textAppearance="@style/TextAppearance.AppCompat.Large"        android:padding="20dp"
      android:gravity="center_vertical"                   android:layout_gravity="center_vertical"
      android:textSize="32sp" /&gt;
  &lt;LinearLayout
      android:layout_weight="1"                  android:background="#fff"
      android:layout_width="match_parent"        android:layout_height="0dp"
      android:orientation="horizontal"&gt;
      &lt;RadioGroup
          android:paddingLeft="30dp"                 android:id="@+id/rgOptions"
          android:layout_width="match_parent"        android:layout_height="match_parent"&gt;
          &lt;LinearLayout
              android:layout_weight="1"                 android:orientation="horizontal"
              android:layout_width="match_parent"                android:layout_height="0dp"&gt;
              &lt;RadioButton
                  android:layout_weight="1"             android:textColor="#000"
                  android:id="@+id/rb1"                 android:text="@string/answer1"
                  android:layout_width="0dp"            android:layout_height="match_parent" /&gt;
              &lt;RadioButton
                  android:layout_weight="1"             android:textColor="#000"
                  android:id="@+id/rb2"                 android:text="@string/answer2"
                  android:layout_width="0dp"            android:layout_height="match_parent" /&gt;
          &lt;/LinearLayout&gt;
          &lt;LinearLayout
              android:layout_weight="1"                 android:orientation="horizontal"
              android:layout_width="match_parent"       android:layout_height="0dp"&gt;
              &lt;RadioButton
                  android:textColor="#000"
                  android:layout_weight="1"             android:layout_gravity="start"
                  android:id="@+id/rb3"                 android:text="@string/answer3"
                  android:layout_width="0dp"            android:layout_height="match_parent" /&gt;
              &lt;RadioButton
                  android:textColor="#000"
                  android:layout_weight="1"             android:layout_gravity="end"
                  android:id="@+id/rb4"                 android:text="@string/answer4"
                  android:layout_width="0dp"            android:layout_height="match_parent" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/RadioGroup&gt;
  &lt;/LinearLayout&gt;
  &lt;LinearLayout
      android:orientation="horizontal"
      android:layout_width="match_parent"        android:layout_height="wrap_content"&gt;
      &lt;Button
          android:layout_weight="1"
          android:text="@string/end"                android:id="@+id/bEnd"  android:layout_gravity="center_horizontal"
          android:layout_width="match_content"            android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>