首页 > 代码库 > android屏蔽BACK键、HOME键和多任务键

android屏蔽BACK键、HOME键和多任务键

HOME:

@Override
public void onAttachedToWindow() {
System.out.println("Page01 -->onAttachedToWindow");
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
super.onAttachedToWindow();
}

BACK键:
@Override
public void onBackPressed() {
// super.onBackPressed();
}

多任务键:
getWindow().addFlags(5);

android屏蔽BACK键、HOME键和多任务键