title: Button to go back to the previous page
body: <p>I want to make a button that allow user to go back to the previous page when click. Just work like the physical back button on the android device. What should I add to the java file?</p>
  
  <p>here is the code(xml):</p>
  
  <pre><code>&lt;Button
          android:id="@+id/button00"
          android:layout_width="80dp"
          android:layout_height="40dp"
          android:layout_marginTop="5dp"
          android:layout_marginBottom="5dp"
          android:layout_marginLeft="10dp"
          android:text="@string/st_pp"
          android:textColor="#01646d"
          android:background="#fef200"/&gt;
  </code></pre>
  
  <p>here is the code(java): </p>
  
  <pre><code>bn00.setOnClickListener(new OnClickListener(){
  
              @Override
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                  Intent it1 = new Intent(getApplicationContext(), Main.class);
                  startActivity(it1);
              }
  
          });
  </code></pre>