title: How to Radiogroup for a radio button in a Relative android layout
body: <p>I'm Developing an android app in which the login activity contains radio button for the field department and years of experience. And I've designed my login activity in Relative layout.So now i wanted to RadioGroup the radiobuttons without changing the alignment. Please Help me ! 
  Thanks in Advance ! </p>
  
  <p>`</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/textView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:text="@string/reg_view"
      android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
  &lt;EditText
      android:id="@+id/editText1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/editText2"
      android:layout_below="@+id/textView1"
      android:layout_marginTop="59dp"
      android:ems="10"
      android:hint="@string/firstname"
      android:inputType="textPersonName"
      android:text="@string/edit_name" /&gt;
  
  &lt;EditText
      android:id="@+id/editText2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/textView2"
      android:layout_below="@+id/editText1"
      android:ems="10"
      android:hint="@string/lastname"
      android:inputType="textPersonName"
      android:text="@string/edit_name" /&gt;
  
  &lt;TextView
      android:id="@+id/textView3"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@+id/editText1"
      android:layout_alignLeft="@+id/editText1"
      android:layout_marginBottom="35dp"
      android:text="@string/name_view"
      android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
  &lt;RadioButton
      android:id="@+id/radioButton2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_above="@+id/textView4"
      android:layout_alignRight="@+id/textView1"
      android:text="@string/teamleader_radio" /&gt;
  &lt;RadioButton
      android:id="@+id/radioButton1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/textView4"
      android:layout_below="@+id/textView2"
      android:checked="true"
      android:text="@string/manager_radio" /&gt;
  &lt;Button
      android:id="@+id/button1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_toRightOf="@+id/textView5"
      android:text="@string/Registration_proceed" /&gt;
  
  &lt;TextView
      android:id="@+id/textView4"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/radioButton1"
      android:layout_centerHorizontal="true"
      android:text="@string/years_view"
      android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
  &lt;RadioButton
      android:id="@+id/radioButton3"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/textView4"
      android:layout_below="@+id/textView4"
      android:text="@string/years_check" /&gt;
  
  &lt;RadioButton
      android:id="@+id/radioButton4"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/radioButton3"
      android:layout_alignBottom="@+id/radioButton3"
      android:layout_centerHorizontal="true"
      android:text="@string/years1_check" /&gt;
  
  &lt;RadioButton
      android:id="@+id/radioButton5"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/radioButton4"
      android:layout_alignBottom="@+id/radioButton4"
      android:layout_alignParentRight="true"
      android:text="@string/years3_check" /&gt;
  
  &lt;TextView
      android:id="@+id/textView5"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/radioButton3"
      android:layout_toLeftOf="@+id/radioButton4"
      android:text="@string/dept_view"
      android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
  &lt;TextView
      android:id="@+id/textView2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/radioButton1"
      android:layout_below="@+id/editText2"
      android:text="@string/desig_view"
      android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  </code></pre>
  
  <p>`</p>