title: android how to set checkbox icon on rightside?
body: <p>i am making an api in which i am using checkbox in my xml file.the problem is that my checkbox icons are showing on left side.,but i want to move my checkbox on right side near text "male" or"female". like this..
  <img src="https://i.stack.imgur.com/G7CWI.png" alt="enter image description here"></p>
  
  <p>but currently i am getting like this view..</p>
  
  <p><img src="https://i.stack.imgur.com/emLVN.png" alt="enter image description here"></p>
  
  <p>i want my checkicon option on rightside..,i have used this code..here is my xml..</p>
  
  <p>
  </p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/header_layout"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:background="#43A6E5" &gt;
  
      &lt;TextView
          android:id="@+id/tv_header"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="Earn 1 PTS for every Chat you Receive"
  
          android:textColor="#FFF200"
          android:textSize="18dp" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;View
      android:id="@+id/view1"
      android:layout_width="fill_parent"
      android:layout_height="6dp"
      android:layout_below="@+id/header_layout"
      android:layout_centerHorizontal="true"
      android:background="#46B1F6" /&gt;
  
  &lt;RelativeLayout
      android:id="@+id/edt_layout"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_below="@+id/view1"
      android:background="#46B1F6" &gt;
  
      &lt;EditText
          android:id="@+id/et_mail"
          style="@style/EdittextStyle"
          android:layout_alignLeft="@+id/et_name"
          android:layout_alignRight="@+id/et_name"
          android:layout_below="@+id/et_name"
          android:background="@drawable/rounded_edittext"
          android:text="  Your Email" &gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
      &lt;Spinner
          android:id="@+id/spinner1"
          android:layout_width="80dp"
          android:layout_height="35dp"
          android:layout_alignLeft="@+id/et_mail"
          android:layout_below="@+id/et_mail"
          android:layout_marginTop="33dp"
          android:background="@drawable/rounded_edittext" /&gt;
  
      &lt;EditText
          android:id="@+id/editText1"
          style="@style/EdittextStyle"
          android:layout_alignBottom="@+id/spinner1"
          android:layout_alignRight="@+id/et_mail"
          android:layout_marginLeft="14dp"
          android:layout_toRightOf="@+id/spinner1"
          android:background="@drawable/rounded_edittext"
          android:text="  Your Phone"
          android:textColor="#ffffff" /&gt;
  
      &lt;EditText
          android:id="@+id/et_name"
          style="@style/EdittextStyle"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="29dp"
          android:background="@drawable/rounded_edittext"
          android:text="  Your Name" /&gt;
  
      &lt;!-- android:background="@drawable/rounded_edittext" /&gt; --&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
      android:id="@+id/checkbox_layoyt"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_below="@+id/edt_layout"
      android:layout_marginTop="34dp" &gt;
  
      &lt;CheckBox
          android:id="@+id/cb_male"
          android:layout_width="80dp"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="29dp"
          android:background="@drawable/rounded_edittext"
          android:text=" Male"
          android:textColor="#ffffff"
          android:textSize="18dp" /&gt;
  
  
      &lt;CheckBox
          android:id="@+id/cb_female"
          android:layout_width="100dp"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="18dp"
          android:layout_toRightOf="@+id/cb_male"
          android:background="@drawable/rounded_edittext"
          android:text=" Female"
          android:textColor="#ffffff"
          android:textSize="18dp" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;Button
      android:id="@+id/button1"
      android:layout_width="250dp"
      android:layout_height="40dp"
      android:layout_below="@+id/checkbox_layoyt"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="27dp"
      android:background="@drawable/mybutton"
      android:gravity="center"
      android:text="Create Account"
      android:textColor="#ffffff"
      android:textSize="22dp" /&gt;
  
  &lt;TextView
      android:id="@+id/textview_agree"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/button1"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="16dp"
      android:gravity="center"
      android:text="I agree to the terms and conditions"
      android:textColor="#ffffff"
      android:textSize="14dp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thankyou..</p>