ISimpleDialogListener
165407
@Override
    public void onPositiveButtonClicked(int requestCode) {
        if (requestCode == REQUEST_SIMPLE_DIALOG) {
            Toast.makeText(c, "Positive button clicked", Toast.LENGTH_SHORT).show();
        }
    }
264453
private AnimatorListener createDismissAnimationListener() {
        return new AnimatorListenerAdapter() {

            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                AbstractAnimateableDialog.super.dismiss();
            }

        };
    }
875721
public T imeAction(TextView.OnEditorActionListener listener) {
        if (view instanceof EditText) {
            ((EditText)view).setOnEditorActionListener(listener);
        }
        return self();
    }
64470
private Optional<Object> touchAuditor(AuditableBeanWrapper<?> wrapper,
			boolean isNew) {

		Assert.notNull(wrapper, "AuditableBeanWrapper must not be null!");

		return auditorAware.map(it -> {

			Optional<?> auditor = it.getCurrentAuditor();

			Assert.notNull(auditor,
					() -> String.format("Auditor must not be null! Returned by: %s!",
							AopUtils.getTargetClass(it)));

			auditor.filter(__ -> isNew).ifPresent(foo -> wrapper.setCreatedBy(foo));
			auditor.filter(__ -> !isNew || modifyOnCreation)
					.ifPresent(foo -> wrapper.setLastModifiedBy(foo));

			return auditor;
		});
	}
216409
private boolean notifyOnFinish(final int index) {
        boolean result = true;

        for (WizardListener listener : wizardListeners) {
            result &= listener.onFinish(index, viewPagerAdapter.getItem(index));
        }

        return result;
    }
673369
public function canSeeDialog()
    {
        $I = $this->tester;
        $I->switchToIFrame();
        $I->waitForElement(self::$openedModalSelector);
        // I will wait two seconds to prevent failing tests
        $I->wait(2);
    }
987384
private void promptForTileSource() {
        AlertDialog.Builder builderSingle = new AlertDialog.Builder(getContext());
        builderSingle.setIcon(R.drawable.icon);
        builderSingle.setTitle("Select Offline Tile source:-");

        final ArrayAdapter<ITileSource> arrayAdapter = new ArrayAdapter<ITileSource>(getContext(), android.R.layout.select_dialog_singlechoice);
        arrayAdapter.addAll(tileSources);

        builderSingle.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });

        builderSingle.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                final ITileSource strName = arrayAdapter.getItem(which);
                AlertDialog.Builder builderInner = new AlertDialog.Builder(getContext());
                builderInner.setMessage(strName.name());
                builderInner.setTitle("Your Selected Item is");
                builderInner.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                        mMapView.setTileSource(strName);//new XYTileSource(strName, 0, 22, 256, "png", new String[0]));
                        //on tile sources that are supported, center the map an area that's within bounds
                        if (strName instanceof MapsForgeTileSource) {
                            final MapsForgeTileSource src = (MapsForgeTileSource) strName;
                            mMapView.post(new Runnable() {
                                @Override
                                public void run() {
                                    mMapView.getController().setZoom(src.getMinimumZoomLevel());
                                    mMapView.setMinZoomLevel((double) src.getMinimumZoomLevel());
                                    mMapView.setMaxZoomLevel((double) src.getMaximumZoomLevel());

                                    mMapView.invalidate();
                                    mMapView.zoomToBoundingBox(src.getBoundsOsmdroid(), true);

                                }
                            });


                        } else if (strName instanceof GeopackageRasterTileSource) {
                            final GeopackageRasterTileSource src = (GeopackageRasterTileSource) strName;
                            mMapView.post(new Runnable() {
                                @Override
                                public void run() {
                                    mMapView.getController().setZoom(src.getMinimumZoomLevel());
                                    mMapView.setMinZoomLevel((double) src.getMinimumZoomLevel());
                                    mMapView.setMaxZoomLevel((double) src.getMaximumZoomLevel());
                                    mMapView.invalidate();
                                    mMapView.zoomToBoundingBox(src.getBounds(), true);
                                }
                            });
                        }

                        dialog.dismiss();
                    }
                });
                builderInner.show();
            }
        });
        builderSingle.show();
    }
544082
public static boolean notifyPostEventListenerProviders(IServletContext isc,AsyncContextImpl ac) {
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext). _PostEventListenerProviders:"+_PostEventListenerProviders);
        }
        boolean result = false;
        Iterator<PostEventListenerProvider> pelps = _PostEventListenerProviders.getServices();
        ArrayList<PostEventListenerProvider> reversePelps = new ArrayList<PostEventListenerProvider>();
               
        // reverse the order so highest ranked goes last
        while (pelps.hasNext()) {
            reversePelps.add(0,pelps.next());
        }
        if (!reversePelps.isEmpty()) {
            for (PostEventListenerProvider pelp : reversePelps) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "RegisterEventListenerProvider notifyPostEventListenerProvider(IServletContext,AsyncContext) notify listener.");
                }            
                pelp.registerListener(isc,ac);
            }    
            result=true;
        }
        return result;
    }
109914
private void notifyListener(RequestResponseClass clazz, 
	        ISFSObject params, User user, Object userAgent) throws Exception {
	    Object listener = clazz.newInstance();
	    setDataToListener(clazz, listener, params);
	    invokeExecuteMethod(clazz.getExecuteMethod(), listener, userAgent);
	    responseClient(clazz, listener, user);
	}
1035480
private void setClickListener(View view) {
    if (view.getId() == INVALID) {
      return;
    }
    //adapterview does not support click listener
    if (view instanceof AdapterView) {
      return;
    }

    view.setOnClickListener(new View.OnClickListener() {
      @Override public void onClick(View v) {
        if (onClickListener == null) {
          return;
        }
        onClickListener.onClick(DialogPlus.this, v);
      }
    });
  }
633396
function addListener(uid) {
		var addedListener = false;
		if(typeof(dashboardListeners[uid]) === 'undefined') {
			dashboardListeners[uid] = {
				'startTime': new Date(),
				'numIterations': 0,
				'uid': uid,
				'numStarts': 1,
			};
			addedListener = true;
		} else {
			// Don't add the listener.
			dashboardListeners[uid].numStarts += 1;
		}
		return addedListener;
	}
258989
public static boolean show(final Activity activity) {
        final SharedPreferences preferences = activity.getSharedPreferences(PREFERENCES_EULA,
                Activity.MODE_PRIVATE);
        if (!preferences.getBoolean(PREFERENCE_EULA_ACCEPTED, false)) {
            final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
            builder.setTitle("License");
            builder.setCancelable(true);
            builder.setPositiveButton("Accept", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    accept(preferences);
                    if (activity instanceof OnEulaAgreedTo) {
                        ((OnEulaAgreedTo) activity).onEulaAgreedTo();
                    }
                }
            });
            builder.setNegativeButton("Refuse", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    refuse(activity);
                }
            });
            builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
                public void onCancel(DialogInterface dialog) {
                    refuse(activity);
                }
            });
            builder.setMessage(readEula(activity));
            builder.create().show();
            return false;
        }
        return true;
    }
1143285
private boolean registerListener(IServletContext webapp, String listenerClassName, ClassLoader classLoader) {
        try {
            ServletContextListener listener = (ServletContextListener) Class.forName(listenerClassName, true, classLoader).newInstance();
            webapp.addLifecycleListener(listener);
        } catch (Exception e) {
            if (log.isLoggable(Level.WARNING)) {
                log.logp(Level.WARNING, CLASS_NAME, "registerListener", FacesMessages.getMsg("jsf.warn.exception.during.listener", new Object[] { listenerClassName,
                                                                                                                                                 applicationName }), e);
            }
            return false;
        }
        return true;
    }
997221
private OnClickListener createPositiveButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                Toast.makeText(getActivity(), R.string.positive_button_toast, Toast.LENGTH_SHORT)
                        .show();
            }

        };
    }
668914
private void initListeners() {
		
		setOnTouchListener(new OnTouchListener() {

			@Override
			public boolean onTouch(View v, MotionEvent event) {

				if (event.getAction() == MotionEvent.ACTION_DOWN)
					scrollDisabled = true;

				else if (event.getAction() == MotionEvent.ACTION_UP)
					scrollDisabled = false;

				return false;
			}
		});
	}
1112170
public static void executeOnGlobalLayout(@NonNull final View view, @NonNull final ViewTreeObserver.OnGlobalLayoutListener listener) {
        ViewTreeObserver vto = view.getViewTreeObserver();
        vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
                    view.getViewTreeObserver()
                            .removeGlobalOnLayoutListener(this);
                } else {
                    view.getViewTreeObserver()
                            .removeOnGlobalLayoutListener(this);
                }

                listener.onGlobalLayout();
            }
        });
    }
442566
public synchronized boolean addIncomingChatMarkerMessageListener(ChatMarkersListener listener) {
        boolean res = incomingListeners.add(listener);
        if (!enabled) {
            serviceDiscoveryManager.addFeature(ChatMarkersElements.NAMESPACE);
            enabled = true;
        }
        return res;
    }