daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2.     public boolean onKeyDown(int keyCode, KeyEvent event)  {
  3.         if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
  4.             // don't write anything here to make back button not work
  5.             }
  6.             return true;
  7.         }
  8.  
  9.         return super.onKeyDown(keyCode, event);
  10.     }
  11.    
  12. @Override
  13. public void onBackPressed() {
  14. // don't write anything here to make back button  not work
  15. }
  16.    
  17. @Override
  18. public void onBackPressed() {
  19. //do nothing
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top