//按後退鍵返回鍵回主菜單@Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { startActivity(new Intent(getApplicationContext(),MainActivity.class)); return true; } return false;}