/** * 软键盘显示与隐藏的监听 */ private void softKeyboardListnenr() { SoftKeyBoardListener.setListener(getActivity(), new SoftKeyBoardListener.OnSoftKeyBoardChangeListener() { @Override public void keyBoardShow(int height) {/*软键盘显示*/ } @Override public void keyBoardHide(int height) {/*软键盘隐藏*/ } }); }