android屏蔽Home键

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

	  }

你可能感兴趣的:(android,android应用)