DialogInterface cancel - 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 cancel method.

This code example shows how to use the following methods:cancel
                public void onClick(DialogInterface dialog, int index) { 
                    if (index >= 0 && index < mAccounts.length) { 
                        mAccount = mAccounts[index]; 
                        startAuthentication(); 
                    } 
                    dialog.cancel(); 
                } 
            }; 
 
    public IITC_DeviceAccountLogin(IITC_Mobile activity, WebView webView,
                                   WebViewClient webViewClient) {
        mActivity = activity;
        mWebView = webView;
        mAccountManager = AccountManager.get(activity);
        mAccountAdapter = new AccountAdapter();
 
        // dialog that serves as a progress bar overlay 
        mProgressbar = new AlertDialog.Builder(mActivity)
                .setCancelable(false)
                .setView(mActivity.getLayoutInflater().inflate(R.layout.dialog_progressbar, null))
7
CodeRank
This code example shows how to use the following methods:cancel
                .setPositiveButton( 
                        context.getResources().getString(
                                R.string.ok),
                        new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        dialog.cancel();
                    } 
                }); 
        return  builder.create();   
    } 
     
    /** 
     * @return  HTML displaying the changes since the previous 
     *          installed version of your app (what's new) 
     */ 
    public String getLog() {
        return  this.getLog(false);
    } 
 
    /** 
6
CodeRank
This code example shows how to use the following methods:cancel
     */ 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        switch (which) {
            case DialogInterface.BUTTON_NEGATIVE:
                dialog.cancel();
                break; 
            case DialogInterface.BUTTON_POSITIVE:
                final long accountId = getArguments().getLong("accountId");
                final String text = mQuickResponseEditText.getText().toString();
                final Context context = getActivity();
                if (mQuickResponse == null) {
                    mQuickResponse = new QuickResponse(accountId, text);
                } 
 
                // Insert the new QuickResponse into the database. Content watchers used to 
                // update the ListView of QuickResponses upon insertion. 
                EmailAsyncTask.runAsyncParallel(new Runnable() {
                    @Override 
                    public void run() { 
6
CodeRank
This code example shows how to use the following methods:cancel, dismiss
This code example shows how to use the following methods:cancel
    			        finish();
    		        } 
    			}) 
    		.setNegativeButton(R.string.cancel_dialog, new AlertDialog.OnClickListener() {
    			public void onClick(DialogInterface dialog, int which) {
    			        dialog.cancel();
    			} 
    			}) 
    			.create(); 
    		return alertDialog;
    		default: 
    			//@SuppressWarnings("deprecation") 
    			return super.onCreateDialog(id);
    	} 
    } 
     
    public void qdWay(View v) {
    	Log.d(TAG, "Quick&Dirty Way invoked");
    	Dialog dlg = onCreateDialog(DLG_UNSAVED);
    	dlg.show();
6
CodeRank
This code example shows how to use the following methods:cancel
                .setTitle(getString(R.string.imei_not_sane_title))
                .setMessage(getString(R.string.imei_not_sane_message))
                .setPositiveButton(getString(R.string.imei_not_sane_ok),
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {
                                dialog.cancel();
                                finish();
                            } 
                        }) 
                .setCancelable(false) 
                .create().show(); 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:cancel
		Dialog aboutDialog = new AlertDialog.Builder(getActivity()).setView(view)
				.setTitle(getString(R.string.dialog_about_title))
				.setNeutralButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
					@Override 
					public void onClick(DialogInterface dialog, int id) {
						dialog.cancel();
					} 
				}).create(); 
		aboutDialog.setCanceledOnTouchOutside(true);
 
		return aboutDialog;
	} 
} 
6
CodeRank
This code example shows how to use the following methods:cancel, dismiss
			builder.setTitle(R.string.error_title);
			builder.setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
				 
				@Override 
				public void onClick(DialogInterface dialog, int which) {
					dialog.cancel();
					dialog.dismiss();
				} 
			}); 
			builder.create().show();
		} 
		 
	} 
} 
5
CodeRank
This code example shows how to use the following methods:cancel
                    .setTitle(R.string.modem_error)
                    .setMessage(R.string.device_rebooted_modem_error) 
                    .setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                        @Override 
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.cancel();
                        } 
                    }) 
                    .setOnCancelListener(new DialogInterface.OnCancelListener() {
                        @Override 
                        public void onCancel(DialogInterface dialog) {
                            finish();
                        } 
                    }) 
                    .create(); 
        } 
 
        return super.onCreateDialog(id, args);
    } 
 
6
CodeRank
This code example shows how to use the following methods:cancel
         
        builder.setMessage("Esto es un mensaje de alerta.")
        	   .setTitle("Información")
               .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                	   dialog.cancel();
                   } 
               }); 
 
        return builder.create();
    } 
} 
6
CodeRank

Related DialogInterface cancel Questions & Answers:

Other DialogInterface cancel Examples

174:					new DialogInterface.OnClickListener() {
175:						public void onClick(DialogInterface dialog, int which) {
176:							dialog.cancel();
177:						}
178:					});

Read More

170:	        alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
171:	            public void onClick(DialogInterface dialog, int which) {
172:	            dialog.cancel();
173:	            }
174:	        });

Read More

32:	        alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
33:	            public void onClick(DialogInterface dialog, int which) {
34:	            dialog.cancel();
35:	            }
36:	        });

Read More

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