I have a simply question. I set up the button which is closing my app:
Button turnoffbutt = (Button) findViewById(R.id.button3);
turnoffbutt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
System.exit(0);
}
});
It's working very good, but only when I turn on my app. When I open another activity by a button
startActivity(new Intent(MenuActivity.this, SettingsActivity.class));
and then I go back to the menu I can't quit my app (by this button Close). It's getting me to the settingsactivity. I know that this method (startactivity) is creating a new activity. That's why I can't quit my app. But how to resolve this problem? May I have to change something on turnoffbutt or use another method to get to the another activity?
Thanks in advance!