Code example for DialogInterface.OnCancelListener

Methods: onCancel

0
			} 
			progressDialog.setOnCancelListener(new OnCancelListener() { 
				@Override 
				public void onCancel(DialogInterface dialog) {
					if (mOnCancelListener != null) {
						mOnCancelListener.onCancel(dialog);
					} 
				} 
			}); 
			progressDialog.setCanceledOnTouchOutside(false); 
			((Dialog) progressDialog).show(); 
			progressDialog.setContentView(view,new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); 
		} catch (Exception e) {
			e.printStackTrace();
		} 
	} 
	 
	public void show() { 
		if (progressDialog != null) {
			progressDialog.show();
		}else if (mMessage != null) {