title: onBackPressed causing problems in code
body: <p>I have following code in an activity SCORE:</p>
  
  <pre><code>@Override
      public void onBackPressed() {                  
          Intent i = new Intent(Score.this, MainActivity.class);
          startActivity(i);
      } 
  </code></pre>
  
  <p>Basically when user hits back i want them to go back to main activity. In main i have button when hit it exits the app something like this:</p>
  
  <pre><code>case R.id.exitButton:
              finish();
              break;
  </code></pre>
  
  <p>So when i start app and hit exit button it works fine it exits the app. But when i am at score page and hit back and than hit exit button app does not exit it goes back to score page. Can anyone please tell what am i doing wrong?</p>