Add this in ur manifest
android:windowSoftInputMode="adjustResize"
For Example :
Modify ur manifest like this
<activity
android:name="com.example.admob.MainActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize" >
This will work .. Now The Entire layout will be shifted Up . .But If u add ur image as background image it will not be shifted.
EX: android:background="@drawable/background"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/xxx"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background">
</RelativeLayout>
Now the edittext and the other views will be shifted but not the image