I am new to android development, I want to exit totally from the activity.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);
Button orderButton = (Button) findViewById(R.id.button3);
Button exit = (Button) findViewById(R.id.button2);
exit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}