DialogInterface dismiss - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for DialogInterface dismiss method.

This code example shows how to use the following methods:dismiss
        return dialog;
    } 
 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        dialog.dismiss();
        switch (which) {
        case BUTTON_POSITIVE:
            onResult(RESULT_OK);
            break; 
        case BUTTON_NEGATIVE:
            onResult(RESULT_CANCELED);
            break; 
        } 
    } 
} 
8
CodeRank
This code example shows how to use the following methods:dismiss
        return dialog;
    } 
 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        dialog.dismiss();
    } 
} 
8
CodeRank
This code example shows how to use the following methods:dismiss
                    View decor = win.getDecorView();
                    if (decor != null) {
                        KeyEvent.DispatcherState ds = decor.getKeyDispatcherState();
                        if (ds != null && ds.isTracking(event)) {
                            mMenu.close(true);
                            dialog.dismiss();
                            return true; 
                        } 
                    } 
                } 
            } 
        } 
 
        // Menu shortcut matching 
        return mMenu.performShortcut(keyCode, event, 0);
 
    } 
 
    public void setPresenterCallback(MenuPresenter.Callback cb) { 
        mPresenterCallback = cb; 
7
CodeRank
This code example shows how to use the following methods:dismiss
            builder.setSingleChoiceItems(items, -1,
                    new DialogInterface.OnClickListener(){
                public void onClick(DialogInterface dialog, int which) {
                    switch (which) {
                        case OPEN_DIRECTORY:
                            dialog.dismiss();
                            mPath = path;
                            mFocusFile = null;
                            updateList(); 
                            break; 
                        case RUN_TESTS:
                            dialog.dismiss();
                            processDirectory(path, false);
                            break; 
                    } 
                } 
            }); 
            builder.create().show();
        } else { 
            processFile(path, false);
7
CodeRank
This code example shows how to use the following methods:dismiss
                }); 
        builder.setNegativeButton(android.R.string.cancel,
                new DialogInterface.OnClickListener() {
                    @Override 
                    public void onClick(DialogInterface dialog, int whichButton) {
                        dialog.dismiss();
                    } 
                }); 
        return builder.create();
    } 
} 
7
CodeRank
This code example shows how to use the following methods:dismiss
		this.setTitle( title );
		this.setMessage( message );
		this.setCancelable( false );
		this.setButton( "Ok", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
            	dialog.dismiss();
            } 
        });			 
	} 
} 
7
CodeRank
This code example shows how to use the following methods:cancel, dismiss
This code example shows how to use the following methods:dismiss
        builder.setCancelable(false);
        builder.setPositiveButton(context.getString(android.R.string.ok), new OnClickListener() {
 
            @Override 
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            } 
        }); 
 
        builder.setTitle(title);
        builder.setMessage(message);
        builder.setIcon(iconId);
 
        return builder;
    } 
 
    public static AlertDialog.Builder newMessageDialog(final Context context, int titleId,
            int messageId, int iconId) {
        return newMessageDialog(context, context.getString(titleId), context.getString(messageId),
                iconId);
7
CodeRank
This code example shows how to use the following methods:dismiss
		this.setTitle( title );
		this.setMessage( message );
		this.setCancelable( false );
		this.setButton( "Ok", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
            	dialog.dismiss();
            	activity.finish();
            } 
        });			 
	} 
} 
7
CodeRank
This code example shows how to use the following methods:dismiss
		this.setTitle( "About dSploit v" + System.getAppVersionName() );
		this.setView( view );
 
		this.setButton( "Ok", new DialogInterface.OnClickListener() {
            public void onClick( DialogInterface dialog, int id ) {
            	dialog.dismiss();
            } 
        });			 
	} 
} 
7
CodeRank

Related DialogInterface dismiss Questions & Answers:

dismiss Method Overview
See Code Examples for other Android DialogInterface Methods: