title: Android navigating up on button click
body: <p>I have two activities Activity A and Activity B with title bar hidden. I don't want to use NavUtils.navigateUpFromSameTask. I can go from Activity A to Activity B on button click. I need to navigate back to Activity A without using Intent.</p>
  
  <p><strong>Activity_A.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Go to Activity B" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Activity_B.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  &lt;Button
      android:id="@+id/button2"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="Go Back to Activity A" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Activity_A.java</strong></p>
  
  <pre><code>Button button1 = (Button) findViewById(R.id.button1);
  
  button1.setOnClickListener(new View.OnClickListener() {
  
  @Override
  public void onClick(View arg0) {
  
          Intent intent = new Intent(context, Activity_B.class);
          startActivity(intent);
          }
  
          });
  </code></pre>
  
  <p><strong>Activity_B.java</strong></p>
  
  <pre><code>   protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              this.requestWindowFeature(Window.FEATURE_NO_TITLE);
              setContentView(R.layout.Avtivity_B);
      Button button2 = (Button) findViewById(R.id.button2);
  
          button2.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
                --&gt; Code to Navigate up to Activity A &lt;--   
                  }
         });
    }
  </code></pre>
  
  <p>I have title bar hidden and i don't want to use NavUtils or intent.</p>