title: How to set the relative layout to move based on the Default keyboard appearance and disappearance?
body: <p>This is the Screen Shot of my View:
  <img src="https://i.stack.imgur.com/y3Nsz.png" alt="enter image description here"></p>
  
  <p>Here Previous, Reply and Next button is on the RelativeLayout. Right now i have set the Topmargin of that relativelayout. I want to set as like if the default keyboard is apper then that layout should be on the uper side of the keyboard, and if the keyboard is disapper then that layout should be goes to the Bottom of the Screen.</p>
  
  <p>the Code for that view is as below :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p>
      
      </p>
  
  <pre><code>    &lt;Button
          android:id="@+id/returnToSoundTest"
          android:layout_width="60dip"
          android:layout_height="20dip"
          android:text="Sound Test"
          android:textColor="#ffffff"
          android:layout_marginRight="3dip"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true"
          android:background="@drawable/glossy_button_blank_black_rectangle"
          &gt;
      &lt;/Button&gt;
  
      &lt;TextView 
          android:id="@+id/heading"
          android:text="test_name"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          android:gravity="center"
  
          android:textColor="#FFFFFF"
          android:textSize="28dip"
          &gt;
      &lt;/TextView&gt;
      &lt;Button
          android:id="@+id/exit"
          android:layout_width="60dip"
          android:layout_height="20dip"
          android:text="Exit"
          android:textColor="#ffffff"
          android:layout_marginLeft="3dip"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"
          android:background="@drawable/glossy_button_blank_black_rectangle"
          &gt;
      &lt;/Button&gt;
  
  &lt;/RelativeLayout&gt;
  &lt;!-- Header Part End --&gt;
  &lt;RelativeLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:gravity="center_horizontal"
      android:layout_marginTop="45dip"&gt;
  &lt;!-- ++++++++++++++ EXTRA BUTTON +++++++++++++++++++++++++ --&gt;
              &lt;com.quiz.spellingquiz.MyButton
                      android:id="@+id/deleteall"
                      android:layout_width="80dip"
                      android:layout_height="wrap_content"
                      android:text="Deleteall"
                      android:textSize="22dip"
                      android:textColor="#ffffff"
  
                      android:background="@drawable/btn_home_continue"/&gt;
  
  
              &lt;com.quiz.spellingquiz.MyButton
                      android:id="@+id/showall"
                      android:layout_width="80dip"
                      android:layout_height="wrap_content"
                      android:text="Show all"
                      android:textSize="22dip"
                      android:textColor="#ffffff"
                      android:layout_alignParentRight="true"
                      android:background="@drawable/btn_home_continue"/&gt;
          &lt;!-- ++++++++++++++ EXTRA BUTTON +++++++++++++++++++++++++ --&gt;
      &lt;LinearLayout 
          android:id="@+id/mainPart"
          android:layout_height="wrap_content"
          android:layout_width="fill_parent"
          android:orientation="vertical"
          android:layout_marginTop="35dip"
          android:padding="15dip"&gt;
  
          &lt;LinearLayout
              android:layout_height="fill_parent"
              android:layout_width="fill_parent"
              android:layout_marginLeft="20dip"
              android:layout_marginRight="20dip"
              android:orientation="vertical"&gt;
              &lt;RelativeLayout
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal"&gt;
  
                  &lt;TextView
                      android:id="@+id/enter_word_text"
                      android:text="Enter word"
                      android:gravity="center_horizontal"
                      android:textColor="#000000"
                      android:textSize="22dip"
                      android:layout_alignParentLeft="true"
                      android:layout_height="wrap_content"
                      android:layout_width="wrap_content"
                      android:layout_marginBottom="4dip"/&gt;
  
                  &lt;TextView
                      android:id="@+id/question_number"
                      android:text="Question of "
                      android:gravity="center_horizontal"
                      android:textColor="#000000"
                      android:textSize="22dip"
                      android:layout_alignParentRight="true"
                      android:layout_height="wrap_content"
                      android:layout_width="wrap_content"
                      android:layout_marginBottom="4dip"/&gt;
              &lt;/RelativeLayout&gt;   
  
              &lt;EditText
                  android:id="@+id/answer_word"
                  android:focusable="true"
                  android:layout_height="40dip"
                  android:layout_width="fill_parent"
                  android:hint="test word"
                  android:layout_gravity="center_vertical"
                  android:layout_marginBottom="3dip"
                  android:textSize="15dip"&gt;
                  &lt;/EditText&gt; 
              &lt;RelativeLayout
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal"&gt;
              &lt;/RelativeLayout&gt;
  
          &lt;/LinearLayout&gt;         
  
      &lt;/LinearLayout&gt;
      &lt;RelativeLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="horizontal" 
          android:layout_width="fill_parent"
          android:layout_height="45dip"
          android:background="@drawable/header_gradient"
          android:layout_below="@+id/mainPart"&gt;
  
          &lt;Button
              android:id="@+id/previous"
              android:layout_width="60dip"
              android:layout_height="20dip"
              android:text="Previous"
              android:textColor="#ffffff"
              android:layout_marginRight="3dip"
              android:layout_alignParentLeft="true"
              android:layout_centerVertical="true"
              android:background="@drawable/glossy_button_blank_black_rectangle"
              &gt;
          &lt;/Button&gt;
  
          &lt;Button
              android:id="@+id/replay"
              android:layout_width="60dip"
              android:layout_height="20dip"
              android:text="Replay"
              android:textColor="#ffffff"
              android:layout_marginLeft="3dip"
              android:layout_toRightOf="@+id/previous"
              android:layout_centerVertical="true"
              android:background="@drawable/glossy_button_blank_black_rectangle"
              &gt;
          &lt;/Button&gt;
  
  
          &lt;Button
              android:id="@+id/nextEvaluate"
              android:layout_width="60dip"
              android:layout_height="20dip"
              android:text="Next"
              android:textColor="#ffffff"
              android:layout_marginLeft="3dip"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"
              android:background="@drawable/glossy_button_blank_black_rectangle"
              &gt;
          &lt;/Button&gt;
  
  &lt;/RelativeLayout&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>So, now What changes i have to do to acheave such type of view appearance ?
  Please help me regarding this.
  Thanks.</p>