Android Launcher - Home Button
问题 I'm developing a Home Screen Launcher App for Android. Now, if the user is already on the homescreen, i want a custom action when the user presses the the homebutton. I know some other launchers, that can override the homebutton, for example Go Launcher Ex. My code is: @Override public boolean dispatchKeyEvent(KeyEvent event) { int action = event.getAction(); int keyCode = event.getKeyCode(); switch (action) { case KeyEvent.ACTION_DOWN: switch (keyCode) { case KeyEvent.KEYCODE_HOME: break; }