use of org.edx.mobile.view.dialog.EnrollmentFailureDialogFragment in project edx-app-android by edx.
the class BaseWebViewFindCoursesActivity method showEnrollErrorMessage.
private void showEnrollErrorMessage(final String courseId, final boolean emailOptIn) {
if (isActivityStarted()) {
Map<String, String> dialogMap = new HashMap<String, String>();
dialogMap.put("message_1", getString(R.string.enrollment_failure));
dialogMap.put("yes_button", getString(R.string.try_again));
dialogMap.put("no_button", getString(R.string.label_cancel));
EnrollmentFailureDialogFragment failureDialogFragment = EnrollmentFailureDialogFragment.newInstance(dialogMap, new IDialogCallback() {
@Override
public void onPositiveClicked() {
onClickEnroll(courseId, emailOptIn);
}
@Override
public void onNegativeClicked() {
}
});
failureDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
failureDialogFragment.show(getSupportFragmentManager(), "dialog");
failureDialogFragment.setCancelable(false);
}
}
Aggregations