@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_HOME) {
Log.i("TAG", "Press Home");
System.exit(0);
return true;
} else {
return super.onKeyDown(keyCode, event);
}
}
@Override
public void onAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
super.onAttachedToWindow();
}
Created
June 5, 2011 13:48
-
-
Save zeuxisoo/1008975 to your computer and use it in GitHub Desktop.
[Android] Disable Home Button
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment