Back:
@Override
public void onBackPressed() {
//Do stuff
}
Menu:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
}
Home: Impossible
Question
Environment: android platform; Maybe you know that the command of "getevent" can output the events got from "/dev/input/eventX". Some devices have virtual keys like back, menu, home etc, and these keys implement also through touch screen. So how can i map the touch screen event at the virtual key area to right key event(back->back, home->home, menu->menu etc).
Solution
Back:
@Override
public void onBackPressed() {
//Do stuff
}
Menu:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
}
Home: Impossible