CopyPastor

Detecting plagiarism made easy.

Score: 0.7583411335945129; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-07-10
by ORBIT

Original Post

Original - Posted on 2014-07-03
by Pheel125



            
Present in both answers; Present only in the new answer; Present only in the old answer;

> **There is two methods**
1
@override public void onBackPressed(){ super.onBackPressed(); finish(); }
2
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { return false; } return super.onKeyDown(keyCode, event); }
You need to Override onKeyDown. You're using onKeyUp.
@Override public boolean onKeyDown(int keycode, KeyEvent e) { switch(keycode) { case KeyEvent.KEYCODE_MENU: doSomething(); return true; } return super.onKeyDown(keycode, e); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;