Android AlertDialog.Builder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android AlertDialog.Builder class.

This code example shows how to use the following methods: create, setMessage, setTitle
     * @param text 
     *          Alert dialog message 
     */ 
    @Deprecated 
    public static void showAlert(Context context, String title, String text) {
        Builder alertBuilder = new Builder(context);
        alertBuilder.setTitle(title);
        alertBuilder.setMessage(text);
        alertBuilder.create().show();
    } 
} 
Full Snippet Info
9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setCancelable, setIcon, setMessage, setPositiveButton, setTitle
                    .getClientMessageResourceId()); 
        } else { 
            screenMessage = error.getLocalizedMessage();
        } 
 
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setTitle(title);
        builder.setMessage(screenMessage);
        builder.setIcon(android.R.drawable.ic_dialog_alert);
        builder.setCancelable(false);
        builder.setPositiveButton(activity.getString(android.R.string.ok), new OnClickListener() {
 
            @Override 
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            } 
        }); 
 
        return builder;
    } 
Full Snippet Info
9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: create, setCancelable, setIcon, setMessage, setPositiveButton
     * @param iconResourceId 
     * @return 
     */ 
    public static AlertDialog newMessageDialog(final Context context, String dialogTitle,
            String screenMessage, int iconResourceId) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setCancelable(false);
        builder.setPositiveButton("Okay", new OnClickListener() {
 
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            } 
        }); 
 
        builder.setTitle(dialogTitle);
        builder.setMessage(screenMessage);
        builder.setIcon(iconResourceId);
 
        return builder.create();
    } 

9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: create, setIcon, setMessage, setNegativeButton, setPositiveButton
This code example shows how to use the following methods: create, setMessage, setTitle
     *          Alert dialog title 
     * @param text 
     *          Alert dialog message 
     */ 
    public static void showAlert(Context context, String title, String text) {
        Builder alertBuilder = new Builder(context);
        alertBuilder.setTitle(title);
        alertBuilder.setMessage(text);
        alertBuilder.create().show();
    } 
 
    /** 
     * A proxy for Log.d api that kills log messages in release build. It 
     * not recommended to send sensitive information to log output in 
     * shipping apps. 
     * 
     * @param tag 
     * @param msg 
     */ 
    public static void logd(String tag, String msg) {
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android AlertDialog.Builder Questions & Answers:

Other Android AlertDialog.Builder Examples

0:	AlertDialog.Builder alertDialog = new AlertDialog.Builder(AlertDialogActivity.this);
1:	
2:			// Setting Dialog Title
-
0:	AlertDialog.Builder alertDialog = new AlertDialog.Builder(AlertDialogActivity.this);
1:	
2:			// Setting Dialog Title

Read More

0:	AlertDialog.Builder alertDialog = new AlertDialog.Builder(AlertDialogActivity.this);
1:	
2:					// Setting Dialog Title
-
0:	AlertDialog.Builder alertDialog = new AlertDialog.Builder(AlertDialogActivity.this);
1:	
2:					// Setting Dialog Title

Read More

0:	AlertDialog alertDialog = new AlertDialog.Builder(
1:							AlertDialogActivity.this).create();
2:

Read More

See Code Examples for Android AlertDialog.Builder Methods: