Capture events from the navigation bar

2

You can capture and block the back, home, and navigation bar tasks.

Or hide it and never appear .

    
asked by Heinz Keydel 27.08.2016 в 00:53
source

1 answer

1

You can capture the events within the onKeyDown () method, for example the back button:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if(keyCode == KeyEvent.KEYCODE_BACK){
        //Se activo la tecla back!
    }
    return super.onKeyDown(keyCode, event);
}

the home button

   if(keyCode == KeyEvent.KEYCODE_HOME)
    {
       //Se activo la tecla home!
    }

The third button I do not know how to do it, previous APIs did not allow the control of this button.

    
answered by 27.08.2016 в 01:16