2011-07-12 81 views

回答

-1

使用像this.If現在你在LastActivity,你想回去的第一項活動,有介於兩者之間,然後,如果你想從上次使用

@Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) { 
     if(autoSearch) 
     if (keyCode == KeyEvent.KEYCODE_HOME) { 
      Log.d("click","HOMEButtonclicked"); 
      LastActivity.this.startActivity(new Intent(LastActivity.this, FirstActivity.class)); 
      moveTaskToBack(false); 
      return true; 
     } 
     return super.onKeyDown(keyCode, event); 
    }