配置文件添加: windowSoftInputMode=”adjustResize” 但是如果设置了沉浸式标题,还需要在布局文件的根节点上加上即可 android:fitsSystemWindows=”true”