You need to set your keyboard’s input mode to adjustResize
. You can do this adding the following line to your activity’s attributes in the manifest:
android:windowSoftInputMode="adjustResize"
Here’s an example of the attribute added in the activity:
<activity
android:name=".activity.MyActivity"
android:windowSoftInputMode="adjustResize">
</activity>