android - Overriding the funcationality of home button -
in android have been able override funcationality of button app need override home button. sure can done how can achieve this.
@override public void onattachedtowindow() { this.getwindow().settype(windowmanager.layoutparams.type_keyguard); super.onattachedtowindow(); }
and then
@override public boolean onkeydown(int keycode, keyevent event) { if(keycode == keyevent.keycode_home) { log.i("home button","clicked"); } if(keycode==keyevent.keycode_back) { finish(); } return false; }
Comments
Post a Comment