@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); }
@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); }
@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); }
@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()); } }
@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(); }
@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); }
private void showCloseDialog() { // Close the event dialogCloseProgress = DialogProgress.build(this); dialogCloseProgress.show(getString(R.string.closing_event)); }
private void showRespondDialog() { // Show the progress bar dialogRespondProgress = DialogProgress.build(this); dialogRespondProgress.show(getString(R.string.responding_event)); }