title: Android Software Back Button Not Returning To Previous View
body: <p>I've been looking for over a month and I cannot get this resolved anywhere. Whenever I hit the back button my app closes. I've searched for <code>finish()</code> I've overridden the <code>onBackPressed()</code>, I just cannot seem to solve this issue.</p>
  
  <pre><code>public class Toasty extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_toasty);
  
      Button button = (Button) findViewById(R.id.button1);
  
      button.setOnClickListener(new OnClickListener() {
  
            public void onClick(View arg0) {
               Toast.makeText(getApplicationContext(),
                       "Here's your toast!", Toast.LENGTH_LONG).show();
               setContentView(R.layout.activity_show_toast);
            }
      });
    }
  }
  </code></pre>
  
  <p>This is pretty much all I do. It pops up on the next screen with a text view and a Toast pops up. Then I press that back button and the app exits when all I want to do is reset so that the button can be pressed again.</p>