Make changes in the activity of your Manifest file like
android:windowSoftInputMode="adjustResize"
OR
Make changes in your onCreate()
method in the activity class like
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);