[Android Tips] 2. Disable recent apps dialog on long press home button
2014-03-20 21:10 shaobin0604 阅读(434) 评论(0) 编辑 收藏 举报public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); Log.d("Focus debug", "Focus changed !"); if(!hasFocus) { Log.d("Focus debug", "Lost focus !"); Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); sendBroadcast(closeDialog); } }
该方法还可以禁止下拉状态栏