@Override
 public void onBackPressed() {
   super.onBackPressed();
   Intent intent = new Intent(getApplicationContext(), Main.class);
   startActivity(intent);
   finish();
 }
 public void onClick(DialogInterface dialog, int which) {
   if (DialogInterface.BUTTON_POSITIVE == which) {
     super.onBackPressed();
   } else if (DialogInterface.BUTTON_NEGATIVE == which) {
     dialog.cancel();
   }
 }
 /*
  * 重写手机返回键
  */
 @Override
 public void onBackPressed() {
   super.onBackPressed();
   finish();
   // 返回动画
   overridePendingTransition(R.anim.back_slide_in_left, R.anim.back_slide_in_right);
 }
Beispiel #4
0
 /** This will be called automatically for you on 2.0 or later */
 @Override
 public void onBackPressed() {
   if (integrateWithHistoryManager && HistoryManager.getInstance().canGoBack()) {
     Log.d(TAG, "Go back");
     goBack();
   } else {
     super.onBackPressed();
   }
 }
Beispiel #5
0
 /** Sets up the data to return to parent activity */
 @Override
 public void onBackPressed() {
   Bundle bundle = new Bundle();
   bundle.putBoolean("RELOAD", changed);
   Intent intent = new Intent();
   intent.putExtras(bundle);
   setResult(RESULT_OK, intent);
   datasource.close();
   super.onBackPressed();
 }
Beispiel #6
0
 @Override
 public void onBackPressed() {
   super.onBackPressed();
   try {
     cancion_sonando = null;
     conex.conexion.removeServerMessageListener(this);
     conex.conexion.cerrarConexion();
   } catch (Exception ex) {
   }
 }
  @Override
  public void onBackPressed() {
    final int drawerState = mMenuDrawer.getDrawerState();
    if (drawerState == MenuDrawer.STATE_OPEN || drawerState == MenuDrawer.STATE_OPENING) {
      mMenuDrawer.closeMenu();
      return;
    }

    super.onBackPressed();
  }
 /*
  * (non-Javadoc)
  *
  * @see android.app.Activity#onBackPressed()
  */
 @Override
 public void onBackPressed() {
   if (filtered) {
     ContactListActivity.this.contact_adapter.getFilter().filter("");
     EditText search_box = (EditText) findViewById(R.id.search_box);
     search_box.setText("");
     filtered = false;
   } else {
     super.onBackPressed();
   }
 }
Beispiel #9
0
  @Override
  public void onBackPressed() {
    if (mDirectory.getParentFile() != null) {
      // Go to parent directory
      mDirectory = mDirectory.getParentFile();
      refreshFilesList();
      return;
    }

    super.onBackPressed();
  }
Beispiel #10
0
  @Override
  public void onBackPressed() {

    if (mParents.size() <= 1) {
      super.onBackPressed();
      return;
    } else {
      mParents.pop();
      populateDirectoryList();
    }
  }
  public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    switch (id) {
      case android.R.id.home:
        super.onBackPressed();
        return true;
    }

    // Navigate to action
    if (id == R.id.action_navigate_to) {
      ActionList actionList = new ActionList();
      actionList.actionList(
          that,
          identityProfileId,
          imageUrl,
          profileName,
          firstName,
          lastName,
          userIdentityProfileId,
          useDefault);
    }

    // My Wami Network
    if (id == R.id.action_home) {
      Intent i = new Intent(ProfilerAudioView.this, WamiListActivity.class);
      i.putExtra("user_identity_profile_id", userIdentityProfileId);
      i.putExtra("use_default", useDefault);
      startActivity(i);
    }

    // Logout
    if (id == R.id.action_logout) {
      this.finish();
      Intent i = new Intent(ProfilerAudioView.this, Login.class);
      startActivity(i);
    }
    return super.onOptionsItemSelected(item);
  }
  @Override
  public void onBackPressed() {
    // TODO Auto-generated method stub
    super.onBackPressed();

    new HomeFragment().refresh();

    shared.fromString = "";
    shared.toString = "";
    shared.through1String = "";
    shared.fromPrice = "";
    shared.toPrice = "";
    shared.departureDate = "";
    shared.day = "";
    if (shared.through2String.length() > 0) {
      shared.through2String = "";
    }
    if (shared.through3String.length() > 0) {
      shared.through3String = "";
    }

    if (HomeFragment.throughPath2 != null) {
      HomeFragment.throughPath2.setText("");
      HomeFragment.throughPath2.setEnabled(true);
      HomeFragment.throughPath2.setFocusableInTouchMode(true);
      HomeFragment.throughPath2.setError(null);
    }
    if (HomeFragment.throughPath3 != null) {
      HomeFragment.throughPath3.setText("");
      HomeFragment.throughPath3.setEnabled(true);
      HomeFragment.throughPath3.setFocusableInTouchMode(true);
      HomeFragment.throughPath3.setError(null);
    }

    HomeActivity.mFrameLayout.setVisibility(View.GONE);
    finish();
  }
Beispiel #13
0
 @Override
 public void onBackPressed() {
   if (!this.backPressed) {
     this.backPressed = true;
     Toast.makeText(this, "Press back again to end.", Toast.LENGTH_SHORT).show();
     this.backPressedThread =
         new Thread(
             new Runnable() {
               @Override
               public void run() {
                 try {
                   Thread.sleep(5000);
                   backPressed = false;
                 } catch (InterruptedException e) {
                   Log.d("VCA-oBP", "Successfully interrupted");
                 }
               }
             });
     this.backPressedThread.start();
     return;
   }
   if (this.backPressedThread != null) this.backPressedThread.interrupt();
   super.onBackPressed();
 }
Beispiel #14
0
 @Override
 public void onBackPressed() {
   if (!this.currentDirectory.getParentFile().equals(new File("/"))) upOneLevel();
   else super.onBackPressed();
 }
Beispiel #15
0
 @Override
 public void onBackPressed() {
   chatMan.chat = null;
   chat = null;
   super.onBackPressed();
 }
 @Override
 public void onBackPressed() {
   super.onBackPressed();
   overridePendingTransition(R.anim.fadein, R.anim.fadeout);
 }
 @Override
 public void onBackPressed() {
   super.onBackPressed();
   overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
 }
 // 清除記憶體
 @Override
 public void onBackPressed() {
   imageLoader.stop();
   AnimateFirstDisplayListener.displayedImages.clear();
   super.onBackPressed();
 }
Beispiel #19
0
 @Override
 public void onBackPressed() {
   super.onBackPressed();
   finish();
 }