Back to project page SnapetsAndroid.
The source code is released under:
Apache License
If you think the Android project SnapetsAndroid 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.keyconsultant.parse.logintutorial.error; // w w w.ja v a 2 s. c o m import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; /** * Dialog factory for unknown errors. (Lazy :-) ). * * @author Trey Robinson * */ public class UnknownErrorDialogFactory { public static AlertDialog createUnknownErrorDialog(Context context){ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context); // set title alertDialogBuilder.setTitle("Error"); // set dialog message alertDialogBuilder .setMessage("An Unknown Error Occured.") .setCancelable(false) .setPositiveButton("OK :-( ",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int id) { // if this button is clicked, close // current activity dialog.cancel(); } }); // create alert dialog AlertDialog alertDialog = alertDialogBuilder.create(); return alertDialog; } }