摘要:
android4.0以下 可用privatebooleancatchHomeKey = false; public void onAttachedToWindow() { if (!catchHomeKey) { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD); } super.onAttachedToWindow(); } 然后再在onKeyDown方法中捕获public boolean onKeyDown(int keyCode, KeyEvent event... 阅读全文