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

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

This code example shows how to use the following methods:create, setMessage, setOnCancelListener
			Log.e(tag, msg, getCause());
		} else { 
			Log.e(tag, msg, this);
		} 
 
		AlertDialog.Builder builder = new Builder(context);
		builder.setMessage(msg);
		if (onCancelListener != null) {
			builder.setOnCancelListener(onCancelListener);
		} 
		builder.create().show();
	} 
 
	/** 
	 *  
	 * @param context 
	 * @param errorMessageId 
	 */ 
	public static void showErrorMessage(Context context, int errorMessageId) {
		AlertDialog.Builder builder = new Builder(context);
5
CodeRank
This code example shows how to use the following methods:setMultiChoiceItems, setOnCancelListener, setPositiveButton, show
    		 lekplatsclass.setspinnerisshowing();
    	 } 
    	  
    	 Log.i("samhall","multispinner performclick");
    	 Builder dialog = new AlertDialog.Builder(getContext());
         AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
    
         builder.setMultiChoiceItems(
                   listitems.toArray(new CharSequence[listitems.size()]), checked, this);
         builder.setPositiveButton("klar",
                 new DialogInterface.OnClickListener()
         { 
 
             @Override 
             public void onClick(DialogInterface dialog, int which)
             { 
                 dialog.cancel();
             } 
         }); 
         builder.setOnCancelListener(this);

6
CodeRank
This code example shows how to use the following methods:setNegativeButton, setOnCancelListener, show
		alertBuilder.setNegativeButton("Close", null);
		alertBuilder.show();
	} 
 
	public static void ShowClosedApplication(final Context mContext) {
		AlertDialog.Builder alertBuilder = new AlertDialog.Builder(mContext);
		alertBuilder
				.setMessage(
						"This Appliction was closed by Owner please contact with him for get more information <email>") 
				.setTitle("Applicatio permision");
 
		alertBuilder.setNegativeButton("Close", new OnClickListener() {
 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
 
				((Activity) mContext).finish();
				dialog.dismiss();
			} 
		}); 

6
CodeRank
This code example shows how to use the following methods:create, setAdapter, setIcon, setOnCancelListener, setTitle
      var4.put("icon", var9);
      this.mItems.add(var4);
   } 
 
   private Dialog createAddAttachmentDialog() {
      Builder var1 = new Builder(this);
      Builder var2 = var1.setIcon(2130837582);
      Builder var3 = var1.setTitle(2131165244);
      this.populateItems();
      String[] var4 = new String[]{"text", "icon"};
      int[] var5 = new int[]{2131558454, 2131558453};
      List var6 = this.mItems;
      SimpleAdapter var8 = new SimpleAdapter(this, var6, 2130903052, var4, var5);
      var1.setAdapter(var8, this);
      var1.setOnCancelListener(this);
      return var1.create();
   } 
 
   private void onAddMusic() { 
      Intent var1 = new Intent("android.intent.action.GET_CONTENT");
      Intent var2 = var1.addCategory("android.intent.category.OPENABLE");
6
CodeRank
This code example shows how to use the following methods:setOnCancelListener
This code example shows how to use the following methods:setOnCancelListener
     * @see #setCancelable(boolean) 
     * 
     * @return This Builder object to allow for chaining of calls to set methods 
     */ 
    public AlertDialogBuilderWrapper setOnCancelListener(OnCancelListener onCancelListener) {
        builder.setOnCancelListener(onCancelListener);
        return this;
    } 
     
    /** 
     * Sets the callback that will be called if a key is dispatched to the dialog. 
     * 
     * @return This Builder object to allow for chaining of calls to set methods 
     */ 
    public AlertDialogBuilderWrapper setOnKeyListener(OnKeyListener onKeyListener) {
        builder.setOnKeyListener(onKeyListener);
        return this;
    } 
     
    /** 
3
CodeRank

Related AlertDialog.Builder setOnCancelListener Questions & Answers:

setOnCancelListener Method Overview
Sets the callback that will be called if the dialog is canceled.
See Code Examples for other Android AlertDialog.Builder Methods: