Simple Android onClick()
public void onClick(View v) { if (v.getId() == R.id.Button01) { // if you pressed the 'Button01' finish(); // finish this Activity } }