문제

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).

도움이 되었습니까?

해결책

Back:

@Override
public void onBackPressed() {
    //Do stuff
}

Menu:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
}

Home: Impossible

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top