Пример #1
0
  @Override
  public void onEventNotReopened() {
    // Event not closed
    dialogCloseProgress.dismiss();

    // Show a Toast notifying
    DialogInformation.build(this)
        .show(getString(R.string.generic_error), DialogInformation.ICON_ALERT);
  }
Пример #2
0
  @Override
  public void onEventNotResponded() {
    // Hide the progress dialog
    dialogRespondProgress.dismiss();

    // Show a Toast notifying
    DialogInformation.build(this)
        .show(getString(R.string.generic_error), DialogInformation.ICON_ALERT);

    // The event has not been responded
    setResult(Imin.RESULT_CODE_POLL_LOCATIONS_ERROR);
  }
Пример #3
0
  @Override
  public void onEventReopened() {
    Event event = imin.getUser().getCurrentEvent();

    // Set closed flag
    event.setClosed(false);

    // Event reopened
    dialogCloseProgress.dismiss();

    // Show a Toast notifying
    DialogInformation.build(this)
        .show(getString(R.string.event_reopened), DialogInformation.ICON_INFO);
  }
Пример #4
0
  @Override
  public void onSaveInstanceState(Bundle savedInstanceState) {
    super.onSaveInstanceState(savedInstanceState);

    // Save the values
    savedInstanceState.putBoolean("closing", closing);
    savedInstanceState.putBoolean("modified", modified);
    savedInstanceState.putBoolean("proposalSelected", proposalSelected);

    // Save the values
    if (dialogRespondProgress != null) {
      savedInstanceState.putBoolean("dialogRespondProgress", dialogRespondProgress.isShown());
    }
    if (dialogCloseProgress != null) {
      savedInstanceState.putBoolean("dialogCloseProgress", dialogCloseProgress.isShown());
    }
    if (dialogResponded != null) {
      savedInstanceState.putBoolean("dialogResponded", dialogResponded.isShown());
    }
    if (dialogClosed != null) {
      savedInstanceState.putBoolean("dialogClosed", dialogClosed.isShown());
    }
  }
Пример #5
0
  @Override
  public void onEventClosed() {
    Event event = imin.getUser().getCurrentEvent();

    // Set closed flag
    event.setClosed(true);
    event.setFinalDateTimeProposal(imin.getUser().getSelectedDateTimeProposal());
    event.setFinalLocationProposal(imin.getUser().getSelectedLocationProposal());

    // Event closed
    dialogCloseProgress.dismiss();

    // Show information dialog
    dialogClosed();
  }
Пример #6
0
  @Override
  public void onEventResponded() {
    Event event = imin.getUser().getCurrentEvent();

    // Flag the event as responded
    event.setResponded(true);

    imin.getUser().setPollResponded(true);

    // Event closed
    dialogRespondProgress.dismiss();

    // Event responded
    dialogResponded();

    // Analytics event
    Analytics.send(this, Analytics.ANALYTICS_EVENT_VOTE);
  }
Пример #7
0
 private void showCloseDialog() {
   // Close the event
   dialogCloseProgress = DialogProgress.build(this);
   dialogCloseProgress.show(getString(R.string.closing_event));
 }
Пример #8
0
 private void showRespondDialog() {
   // Show the progress bar
   dialogRespondProgress = DialogProgress.build(this);
   dialogRespondProgress.show(getString(R.string.responding_event));
 }