在您的清单文件的“activity”元素中,尝试使用android:windowSoftInputMode="adjustResize"
android:windowSoftInputMode="adjustResize"