title: Pressing Back Button did not go back to previous activity Android
body: <p>I was reading through a lot of topics today regarding this. However, all the solutions that I had seen, failed to be a solution for me. I am new in Android development. My problem is that I had two buttons in my main page - namely PlayGame and Help. The PlayGame onClicked() will direct the user to the "difficulty page" where the user can choose Easy, Medium or Hard mode. What I want is that when the user pressed the Android back button in the "difficulty page", it will go back to the main menu (i.e. where the PlayGame and Help can be seen), because what is happening in my case is that it goes back to the Android menu. I finished my activity as shown below and I tried different approach in my two buttons (Help and PlayGame) but did not give me any luck.</p>
  
  <p>This is my mainmenu.</p>
  
  <pre><code>package com.kfc;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.view.Window;
  import android.widget.ImageButton;
  
  public class NewKFCActivity extends Activity {
      /** Called when the activity is first created. */
      ImageButton bPlay, bHelp;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.requestWindowFeature(Window.FEATURE_NO_TITLE);
          setContentView(R.layout.main);
  
      bPlay = (ImageButton) findViewById(R.id.playGame);
      bPlay.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              Intent intent = new Intent(v.getContext(), SelectDifficulty.class);
              intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
              NewKFCActivity.this.startActivity(intent);
  
          }
      });
  
      bHelp = (ImageButton) findViewById(R.id.Help);
      bHelp.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              Intent intent = new Intent(v.getContext(), HelpPageOne.class);
              startActivity(intent);
              finish();
          }
      });
  
  
  }
  @Override
  protected void onPause() {
      // TODO Auto-generated method stub
      super.onPause();
      finish();
  }
  }
  </code></pre>