Back to project page mobile2-android.
The source code is released under:
Apache License
If you think the Android project mobile2-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ecollege.android.errors; // w w w . j a v a 2 s . com import com.ecollege.android.R; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; @SuppressWarnings("serial") public class ECollegePromptException extends ECollegeException { public ECollegePromptException(Context ctx, int errorMessageId, Throwable source) { super(ctx, errorMessageId, source); } public ECollegePromptException(Context ctx, int errorMessageId) { super(ctx, errorMessageId); } public ECollegePromptException(Context ctx, Throwable source) { super(ctx, source); } public void showErrorDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(ctx); builder.setTitle(R.string.error_dialog_default_title); builder.setMessage(errorMessageId); builder.setIcon(android.R.drawable.ic_dialog_alert); builder.setCancelable(false); builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.create().show(); } }