List of usage examples for android.app AlertDialog setTitle
@Override public void setTitle(CharSequence title)
From source file:Main.java
public static AlertDialog clearDialog(final Activity var0, final String var1, final String var2) { Builder builder = new Builder(var0); AlertDialog dialog = builder.create(); dialog.setTitle(var1); dialog.setMessage(var2); return dialog; }
From source file:Main.java
public static void showAlert(Context context, String title, String text) { AlertDialog alertDialog = new Builder(context).create(); alertDialog.setTitle(title); alertDialog.setMessage(text);/*w w w.j a v a 2s. c o m*/ alertDialog.setCanceledOnTouchOutside(true); alertDialog.show(); }
From source file:Main.java
public static void showAlertError(Context context, String Error) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Error"); alertDialog.setMessage(Error); alertDialog.show();//from w ww . jav a 2 s . co m }
From source file:Main.java
static public void showAlert(Context ctx, final String message) { AlertDialog alertDialog = new AlertDialog.Builder(ctx).create(); alertDialog.setTitle("Application Error"); alertDialog.setMessage(message);/*from w w w . java 2 s . co m*/ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "Dismiss", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // Do nothing } }); alertDialog.show(); }
From source file:Main.java
public static void showWarningDialogStatic(String title, String message, Context ctx) { AlertDialog alertDialog = new AlertDialog.Builder(ctx).create(); alertDialog.setTitle(title); alertDialog.setMessage(message);// w w w . j a va 2 s.c o m alertDialog.setButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // here you can add functions } }); alertDialog.show(); }
From source file:Main.java
public static void showAlert(String msg, Context context) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("Alert"); alertDialog.setMessage(msg);/*from w ww . ja v a 2 s. c o m*/ alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); alertDialog.show(); }
From source file:Main.java
public static void showMessage(String message, Context context) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle("New Message"); alertDialog.setMessage(message);/* ww w . j a va 2 s . co m*/ alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); alertDialog.show(); }
From source file:Main.java
public static void displayInfo(Context context, String title, String message) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle(title); alertDialog.setMessage(message);//from ww w . j a v a 2s.c om alertDialog.setIcon(android.R.drawable.ic_dialog_info); alertDialog.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { return; } }); alertDialog.show(); }
From source file:Main.java
public static void showAlertDialog(Context ctx, String title, String message) { AlertDialog alertDialog = new AlertDialog.Builder(ctx).create(); alertDialog.setTitle(title); alertDialog.setMessage(message);/* w ww .ja v a 2 s . co m*/ alertDialog.setButton(DialogInterface.BUTTON_NEUTRAL, "OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }); alertDialog.show(); }
From source file:Main.java
public static void displayAlert(Context context, String title, String message) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle(title); alertDialog.setMessage(message);/*from w ww .j av a 2s. com*/ alertDialog.setIcon(android.R.drawable.ic_dialog_alert); alertDialog.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { return; } }); alertDialog.show(); }