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>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…