-
Deprecated Interfaces
-
Deprecated ClassesClassDescriptionuse
ExternalPreferredCacheDiskCacheFactoryinstead.This class is unused by Glide.ResourceLoader.AssetFileDescriptorFactoryshould be preferred because it's not possible to reliably load a simpleFileDescriptorfor resources.UseUrlUriLoaderinsteadUseUrlUriLoader.StreamFactoryinsteadUseDrawableTransformationinstead.UseVideoDecoder.parcel(BitmapPool)instead. This class may be removed andVideoDecodermay become final in a future version of Glide.This class is unused by Glide and contains only no-op methods. It's retained along with its public methods to avoid breaking binary compatibility. Lifecycle integration is no longer supported outside of androidx Activitys and Fragments.This class is unused by Glide. All functionality has been removed. The class will be removed in a future version.Not ready for public consumption, avoid using this class. It may be removed at any time.UseCustomViewTargetif loading the content into a view, the download API if in the background (http://bumptech.github.io/glide/doc/getting-started.html#background-threads), or a a fully implementedTargetfor any specialized use-cases. Using BaseView is unsafe if the user does not implementBaseTarget.onLoadCleared(android.graphics.drawable.Drawable), resulting in recycled bitmaps being referenced from the UI and hard to root-cause crashes.UseCustomViewTargetif loading the content into a view, the download API if in the background (http://bumptech.github.io/glide/doc/getting-started.html#background-threads), or aCustomTargetfor any specialized use-cases. UsingSimpleTargetorBaseTargetis unsafe if the user does not implementBaseTarget.onLoadCleared(android.graphics.drawable.Drawable), resulting in recycled bitmaps being referenced from the UI and hard to root-cause crashes.UseCustomViewTarget. Using this class is unsafe without implementingViewTarget.onLoadCleared(android.graphics.drawable.Drawable)and results in recycled bitmaps being referenced from the UI and hard to root-cause crashes.In some cases, callers may not handle getting 0 or -1 return values from methods, which can lead to infinite loops (see #4438). UseExceptionPassthroughInputStreaminstead. This class will be deleted in a future version of Glide.
-
Deprecated FieldsFieldDescriptionUse
Headers.DEFAULTinstead.UseDownsampleStrategy.OPTIONdirectly instead.This constant is unused and will be removed in a future version, avoid using it.Identical toRegistry.BUCKET_ANIMATION, just with a more confusing name. This bucket can be used for all animation types (including webp).
-
Deprecated MethodsMethodDescriptionUse
Glide.init(Context, GlideBuilder)to get a singleton compatible with Glide's generated API.This method will be removed in a future version of Glide.
This is equivalent to callingGlide.with(Context)using the application context. Use the androidx Activity class instead (ieFragmentActivity, orAppCompatActivity).This method is identical to callingGlide.with(Context)using the application context. Prefer support Fragments andGlide.with(Fragment)instead. See https://github.com/android/android-ktx/pull/161#issuecomment-363270555.This method does nothing. It will be hard coded and removed in a future release without further warning.UseDiskLruCacheWrapper.create(File, long)to create a new cache with the specified arguments.This is an experimental method that may be removed without warning in a future version.UseGlideExecutor.newAnimationBuilder()instead.UseGlideExecutor.newDiskCacheBuilder()instead.UseGlideExecutor.newSourceBuilder()instead.UseGlideExecutor.newSourceBuilder()instead.UseLazyBitmapDrawableResource.obtain(Resources, Resource)instead, it can be unsafe to extractBitmaps from their wrappedResource.UseLazyBitmapDrawableResource.obtain(Resources, Resource)instead, it can be unsafe to extractBitmaps from their wrappedResource.Width and height are unused and ignored. UseTransformationUtils.roundedCorners(BitmapPool, Bitmap, int)instead.This always returns null. See the class comment for deprecation details.This always returns an empty tree node. See the class comment for deprecation details.This method is a no-op. See the class comment for deprecation details.This is identical to callingRequestManagerRetriever.get(Context)with the application context. Use androidx Activities instead (ieFragmentActivity, orAppCompatActivity).This is equivalent to callingRequestManagerRetriever.get(Context)with the application context. Use androidx fragments instead:Fragment.This method is no longer called by Glide or provides any functionality and it will be removed in the future. Retained for now to preserve backwards compatibility.Always returnsnull. See the class deprecation method for details.Always returnsEmptyRequestManagerTreeNode. See the class deprecation method for details.A no-op method. See the class deprecation method for details.Use the equivalentRegistry.append(Class, Class, ModelLoaderFactory)method instead.Use the equivalentRegistry.append(Class, ResourceEncoder)method instead.Deprecated due to api update, useBaseRequestOptions.transform(Transformation[])insteadUsing this method prevents clearing the target from working properly. Glide uses its own internal tag id so this method should not be necessary. This method is currently a no-op.Glide uses it's own default tag id, so there's no need to specify your own. This method will be removed in a future version.UseRequestBuilder.submit(int, int)instead.TheURLclass has a number of performance problems and should generally be avoided when possible. PreferRequestBuilder.load(android.net.Uri)orRequestBuilder.load(String).The behavior differences between this method andRequestBuilder.thumbnail(RequestBuilder)are subtle, hard to understand for users and hard to maintain for developers. See the javadoc onRequestBuilder.listener(RequestListener)for one concrete example of the behavior differences and complexity introduced by this method. Better consistency and readability can be obtained by callingRequestBuilder.thumbnail(RequestBuilder)with a duplicateRequestBuilderon which you have calledBaseRequestOptions.sizeMultiplier(float). In practice this method also isn't especially useful. It's much more common to want to specify a number of different attributes for thumbnails than just a simple percentage modifier on the target size, so there's little justification for keeping this method. This method will be removed in a future version of Glide.UseUtil.getBitmapByteSize(android.graphics.Bitmap)instead. Scheduled to be removed in Glide 4.0.
-
Deprecated ConstructorsConstructorDescriptionDo not extend this class.You should always include a status code, default to
HttpException.UNKNOWNif you can't come up with a reasonable one. This method will be removed in a future version.UseUnitModelLoader.getInstance()instead.UseUnitModelLoader.Factory.getInstance()instead.UseBitmapDrawableDecoder(Context, ResourceDecoder),bitmapPoolis ignored.UseBitmapEncoder(ArrayPool)instead.UseBitmapDrawableTranscoder(Resources),bitmapPoolis unused.UseViewTarget.waitForLayout()instead.UseViewTarget.waitForLayout()instead.UseViewTarget.waitForLayout()instead.UseViewTarget.waitForLayout()instead.UseViewTarget.waitForLayout()instead.UseViewTarget.waitForLayout()insetad.UseViewTarget.waitForLayout()instead.
LibraryGlideModuleand Applications should useAppGlideModule.