键盘显示影响布局的解决方法

一、AndroidManifet.xml 设置
为对应的Activity添加:android:windowSoftInputMode="adjustPan"

 

二 、后台代码编写

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); 

你可能感兴趣的:(方法)