This is the Screen Shot of my View:

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.
the Code for that view is as below :
<?xml version="1.0" encoding="utf-8"?>
<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"
>
</Button>
<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"
>
</TextView>
<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"
>
</Button>
</RelativeLayout>
<!-- Header Part End -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:layout_marginTop="45dip">
<!-- ++++++++++++++ EXTRA BUTTON +++++++++++++++++++++++++ -->
<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"/>
<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"/>
<!-- ++++++++++++++ EXTRA BUTTON +++++++++++++++++++++++++ -->
<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">
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<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"/>
<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"/>
</RelativeLayout>
<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">
</EditText>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<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">
<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"
>
</Button>
<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"
>
</Button>
<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"
>
</Button>
</RelativeLayout>
</RelativeLayout>
So, now What changes i have to do to acheave such type of view appearance ?
Please help me regarding this.
Thanks.
did you try this by adding this tag under Activity tag in manifest