This one helps
Button button2=(Button)findViewById(R.id.button2);
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent(Menu.this, pistols.class));
}});
another way around. you can override onBackPressed. start the first activity from there.
@Override
public void onBackPressed() {
super.onBackPressed();
// call the first activity here
this.finish();
}