OK I worked it out myself - why do you have to post a question, to them work out what you need to do.
The problem is caused by the
onKeyDown() that is stopping normal behaviour working. So in the
MainActivity.java file the relevant code should be:
Code:
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
startActivity(new Intent("net.learn2develop.ACTIVITY2"));
return false;
}
return super.onKeyDown(keyCode, event);
Now I can close my app by pressing the back button.