首页 > 代码库 > android屏蔽Home键

android屏蔽Home键

@Override
	  public void onAttachedToWindow() {
	      
	    super.onAttachedToWindow();
	  //该方法黑屏
	    //this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
	    //该方法背景透明
	    this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);

	  }

android屏蔽Home键