Пример #1
0
  @Override
  public void onSimpleResult(boolean success, ExtendedHashMap result) {
    if (mProgress != null) {
      mProgress.dismiss();
      mProgress = null;
    }
    super.onSimpleResult(success, result);

    if (Python.TRUE.equals(result.getString(SimpleResult.KEY_STATE))) {
      finish(Activity.RESULT_OK);
    }
  }
Пример #2
0
  @Override
  public void onSaveInstanceState(Bundle outState) {
    outState.putParcelable("timer", mTimer);
    outState.putParcelable("timerOld", mTimerOld);

    String[] selectedTags;
    if (mSelectedTags != null) {
      selectedTags = new String[mSelectedTags.size()];
      mSelectedTags.toArray(selectedTags);
    } else {
      selectedTags = new String[0];
    }
    outState.putStringArray("selectedTags", selectedTags);

    if (mProgress != null) {
      if (mProgress.isShowing()) {
        mProgress.dismiss();
      }
    }

    super.onSaveInstanceState(outState);
  }
Пример #3
0
 @Override
 public void onDestroy() {
   if (mGetLocationsAndTagsTask != null) mGetLocationsAndTagsTask.cancel(true);
   super.onDestroy();
 }
Пример #4
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   initTitles(getString(R.string.timer));
 }