I am developing an application that, when pressed, opens a dialog with the "OK" and "Cancel" buttons.
It works great.
When the user clicks the back button, I process it as follows
public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { } return super.onKeyDown(keyCode, event); }
But the above method is not called. How can I handle this?
android button dialog back
kiran Apr 27 2018-12-12T00 : 00Z
source share