annotationGeneratedModule.registerComponents(applicationContext, glide, glide.registry); applicationContext.registerComponentCallbacks(glide); Glide.glide = glide;
public ColorPickerDialog(Context context, int initialColor) { super(context); context.registerComponentCallbacks(new ComponentCallbacks() { @Override public void onConfigurationChanged(Configuration newConfig) { setUp(mOldColor.getColor(), mNewColor.getColor()); setAlphaSliderVisible(mAlphaSliderEnabled); setHexValueEnabled(mHexValueEnabled); } @Override public void onLowMemory() { } }); init(initialColor); }
@Override public void onAttach(@NonNull Context context) { super.onAttach(context); if (null == mComponentCallback) { mComponentCallback = new OdysseyComponentCallback(); } // Register the memory trim callback with the system. context.registerComponentCallbacks(mComponentCallback); // This makes sure that the container activity has implemented // the callback interface. If not, it throws an exception try { mToolbarAndFABCallback = (ToolbarAndFABCallback) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement ToolbarAndFABCallback"); } }
public static ContactPhotoManager getInstance(Context context) { if (sInstance == null) { Context applicationContext = context.getApplicationContext(); sInstance = createContactPhotoManager(applicationContext); applicationContext.registerComponentCallbacks(sInstance); if (PermissionsUtil.hasContactsPermissions(context)) { sInstance.preloadPhotosInBackground(); } } return sInstance; }
annotationGeneratedModule.registerComponents(applicationContext, glide, glide.registry); context.getApplicationContext().registerComponentCallbacks(glide); Glide.glide = glide;
mContext.registerComponentCallbacks(mComponentCallbacks); mKeyboardConnected = mContext.getResources().getConfiguration() .keyboard != Configuration.KEYBOARD_NOKEYS;
mHostContext.registerComponentCallbacks(new ComponentCallbacks2() { @Override public void onTrimMemory(int level) {