private void checkIfDialogIsVisible() { DialogFragment openDialogFragment = (DialogFragment) getSupportFragmentManager().findFragmentByTag(ADD_PROFILE_DIALOG_TAG); if (openDialogFragment != null) { ((BaseDialog) openDialogFragment).setDialogWatcher(this); } }
private void showProgressDialog() { final Bundle dialogData = new Bundle(); dialogData.putInt(BaseDialog.DIALOG_LAYOUT_KEY, R.layout.progress_dialog_layout); DialogFragment progressDialog = ProgressDialogFragment.getInstance(dialogData); ((BaseDialog) progressDialog).setDialogWatcher(this); progressDialog.setCancelable(false); progressDialog.show(getSupportFragmentManager(), PROGRESS_DIALOG_TAG); }
private void showBattleTagDialog() { final Bundle dialogData = new Bundle(); dialogData.putString(BaseDialog.TITLE_KEY, getString(R.string.add_battletag_dialog_title)); dialogData.putInt(BaseDialog.DIALOG_LAYOUT_KEY, R.layout.add_battletag_dialog); DialogFragment addProfileDialogFragment = AddProfileDialogFragment.getInstance(dialogData); ((BaseDialog) addProfileDialogFragment).setDialogWatcher(this); addProfileDialogFragment.show(getSupportFragmentManager(), ADD_PROFILE_DIALOG_TAG); }
private void showProblemDialog(int strId) { final Bundle dialogData = new Bundle(); dialogData.putString(BaseDialog.TITLE_KEY, getString(R.string.connectivity_alert_dialog_title)); dialogData.putString(WarningDialogFragment.MESSAGE_KEY, getString(strId)); dialogData.putInt(BaseDialog.DIALOG_LAYOUT_KEY, R.layout.warning_dialog_background); DialogFragment warningDialogFragment = WarningDialogFragment.getInstance(dialogData); ((BaseDialog) warningDialogFragment).setDialogWatcher(this); warningDialogFragment.show(getSupportFragmentManager(), WARNING_DIALOG_TAG); }
private void showProfileOptionsDialog(String title, int position) { final Bundle dialogData = new Bundle(); dialogData.putString(BaseDialog.TITLE_KEY, title); dialogData.putInt(BaseDialog.DIALOG_LAYOUT_KEY, R.layout.d3profile_option_layout); dialogData.putInt(ProfileOptionsDialog.PROFILE_POSITION_KEY, position); DialogFragment addProfileDialogFragment = ProfileOptionsDialog.getInstance(dialogData); ((BaseDialog) addProfileDialogFragment).setDialogWatcher(this); addProfileDialogFragment.show(getSupportFragmentManager(), ADD_PROFILE_DIALOG_TAG); }