use of com.owncloud.android.ui.dialog.ConfirmationDialogFragment in project android by owncloud.
the class ReceiveExternalFilesActivity method showErrorDialog.
/**
* Show an error dialog, forcing the user to click a single button to exit the activity
*
* @param messageResId Resource id of the message to show in the dialog.
* @param messageResTitle Resource id of the title to show in the dialog. 0 to show default alert message.
* -1 to show no title.
*/
private void showErrorDialog(int messageResId, int messageResTitle) {
ConfirmationDialogFragment errorDialog = ConfirmationDialogFragment.newInstance(messageResId, // see uploader_error_message_* in strings.xml
new String[] { getString(R.string.app_name) }, messageResTitle, R.string.common_back, -1, -1);
errorDialog.setCancelable(false);
errorDialog.setOnConfirmationListener(new ConfirmationDialogFragment.ConfirmationDialogFragmentListener() {
@Override
public void onConfirmation(String callerTag) {
finish();
}
@Override
public void onNeutral(String callerTag) {
}
@Override
public void onCancel(String callerTag) {
}
});
errorDialog.show(getSupportFragmentManager(), FTAG_ERROR_FRAGMENT);
}
use of com.owncloud.android.ui.dialog.ConfirmationDialogFragment in project android by owncloud.
the class FileActivity method onFailedSavingCertificate.
@Override
public void onFailedSavingCertificate() {
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.ssl_validator_not_saved, new String[] {}, 0, R.string.common_ok, -1, -1);
dialog.show(getSupportFragmentManager(), DIALOG_CERT_NOT_SAVED);
}
Aggregations