title: Unable to align checkbox(horizontally/vertically) in Android app
body: <p>I need to display checkbox. All the check-boxes should align themselves at the extreme right of the screen.However, if I change the orientation of my screen the check-box comes at the middle of the screen.Please help me to solve the issue.Thanks in advance</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
      android:background="#000000" 
    &gt;
  
  
  
  
      &lt;LinearLayout android:id="@+id/LinearLayout02"
  android:layout_width="fill_parent" 
  android:layout_height="wrap_content"
  android:layout_gravity="center_horizontal"
  android:gravity="center"
  android:orientation="vertical"
  android:layout_margin="10dp"&gt;
  
  
  
  
          &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
                       android:layout_width="fill_parent" 
                       android:layout_height="wrap_content"&gt;
  
          &lt;RelativeLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:background="#000000" 
              &gt;
  
  
           &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/sf_table"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:layout_marginTop="50dp"
              android:background="@drawable/test"
  
              &gt;
  
            &lt;View   android:id="@+id/Divider_7"
          android:layout_height="0.5dp"
          android:layout_width="fill_parent"
          android:background="#808080"
  
          android:layout_marginBottom="5dp"
           /&gt;
             &lt;TableRow
                  android:id="@+id/tbr6"
  
                  android:layout_width="fill_parent"
                  android:layout_height="match_parent"
                  android:layout_margin="2dip"
                  android:layout_marginTop="3dp"
                  android:layout_marginBottom="3dp"
                   &gt;
  
               &lt;TextView
                   android:textStyle="bold"
                   android:layout_marginLeft="5dp"
                   android:layout_marginRight="5dp"
                   android:layout_marginTop="2dp"
                   android:layout_marginBottom="2dp"
                   android:textColor="#3399CC"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:text="Pages For Website (existing pages plus new ones you need)-Contact Us"
                   &gt;&lt;/TextView&gt; 
  
  &lt;/TableRow&gt;
  
              &lt;View   android:id="@+id/Divider_2"
          android:layout_height="1.5dp"
          android:layout_width="fill_parent"
          android:background="#C0C0C0"
          android:layout_marginTop="5dp"
          android:layout_marginBottom="5dp"
           /&gt;   
              &lt;TableRow
                  android:id="@+id/tbr9"
                  android:layout_width="fill_parent"
                  android:layout_height="match_parent"
                  android:layout_margin="2dip"
                  android:layout_marginTop="3dp"
                  android:layout_marginBottom="3dp"
                   &gt;
  
  
    &lt;TextView
                   android:textStyle="bold"
                   android:layout_marginLeft="5dp"
                   android:layout_marginRight="5dp"
                   android:layout_marginTop="2dp"
                   android:layout_marginBottom="2dp"
                   android:textColor="#ffffff"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:text="Feedback"
                   &gt;&lt;/TextView&gt; 
  
                    &lt;CheckBox
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                     android:id="@+id/feedback_id"
                          android:layout_gravity="right"
                      &gt;&lt;/CheckBox&gt;
  
  
     &lt;/TableRow&gt;
  
  
  
              &lt;TableRow
                  android:id="@+id/tbr9"
                  android:layout_width="fill_parent"
                  android:layout_height="match_parent"
                  android:layout_margin="2dip"
                  android:layout_marginTop="3dp"
                  android:layout_marginBottom="3dp"
                   &gt;
  
  
    &lt;TextView
                   android:textStyle="bold"
                   android:layout_marginLeft="5dp"
                   android:layout_marginRight="5dp"
                   android:layout_marginTop="2dp"
                   android:layout_marginBottom="2dp"
                   android:textColor="#ffffff"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:text="Tech Support"
                   &gt;&lt;/TextView&gt; 
  
                    &lt;CheckBox
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:id="@+id/techsupport_id"
                          android:layout_gravity="right"
                      &gt;&lt;/CheckBox&gt;
  
  
     &lt;/TableRow&gt;
  
  
                  &lt;TableRow
                  android:id="@+id/tbr9"
                  android:layout_width="fill_parent"
                  android:layout_height="match_parent"
                  android:layout_margin="2dip"
                  android:layout_marginTop="3dp"
                  android:layout_marginBottom="3dp"
                   &gt;
  
  
    &lt;TextView
                   android:textStyle="bold"
                   android:layout_marginLeft="5dp"
                   android:layout_marginRight="5dp"
                   android:layout_marginTop="2dp"
                   android:layout_marginBottom="2dp"
                   android:textColor="#ffffff"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:text="Quote Form"
                   &gt;&lt;/TextView&gt; 
  
                    &lt;CheckBox
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:id="@+id/quoteform_id"
                          android:layout_gravity="right"
                      &gt;&lt;/CheckBox&gt;
  
  
     &lt;/TableRow&gt;
  
            &lt;/TableLayout&gt;
  
  
  
  
  
           &lt;/RelativeLayout&gt; 
  
              &lt;/ScrollView&gt;
  
  
              &lt;/LinearLayout&gt;
  </code></pre>