Android AlertDialog Create showConnectionErrorDialog(Context c)

Here you can find the source of showConnectionErrorDialog(Context c)

Description

show Connection Error Dialog

License

Open Source License

Declaration

public static void showConnectionErrorDialog(Context c) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class Main {
    public static void showConnectionErrorDialog(Context c) {
        AlertDialog.Builder builder = new AlertDialog.Builder(c);
        builder.setTitle("Uh oh")
                .setMessage(//from   ww  w  . j  ava 2s . c  o m
                        "We were unable to reach openwatch.net. Please check your network connection and try again.")
                .setPositiveButton("Bummer",
                        new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog,
                                    int which) {
                                dialog.dismiss();
                            }
                        }).show();
    }
}

Related

  1. getInstallationDialog(final Context context)
  2. showDialog(Context context, String title, String message)
  3. makeDialogBox(Context context, String title, String message, String cancleButton, DialogInterface.OnClickListener cancelCallBack, String okayButton, DialogInterface.OnClickListener okayCallBack)
  4. simpleDialogBox(Context context, String message)
  5. dismissProgressBar(ProgressDialog progressBar)
  6. showInfoDialog(String text, final Context context)
  7. makeSimpleDialog(Activity activity, String text)
  8. makeSimpleDialog(Activity activity, String title, String text)
  9. showDownloadDialog(final Activity activity, CharSequence stringTitle, CharSequence stringMessage, CharSequence stringButtonYes, CharSequence stringButtonNo, final String uriString)