Guest User

Untitled

a guest
Aug 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Get handle of back click in java class
  2. @Override
  3. public boolean onKeyDown(int keyCode, KeyEvent event) {
  4. if (keyCode == KeyEvent.KEYCODE_BACK) {
  5. // Code here
  6. return true;
  7. }
  8. return super.onKeyDown(keyCode, event);
  9. }
  10.  
  11. @Override
  12. public void onBackPressed()
  13. {
  14. your_code(){}
  15.  
  16. super.onBackPressed();
  17. return;
  18. }
Add Comment
Please, Sign In to add comment