Android完美检测键盘弹出/收起
代码很简单,可以直接复制粘贴。原理请参照:http://blog.csdn.net/xiaole0313/article/details/51537809 private void setListenerToRootView() { final View rootView = getWindow().getDecorView().findViewById(android.