Class RequestBuilder<TranscodeType>
- Type Parameters:
TranscodeType- The type of resource that will be delivered to theTarget.
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRequestBuilder(Glide glide, RequestManager requestManager, Class<TranscodeType> transcodeClass, Context context) protectedRequestBuilder(Class<TranscodeType> transcodeClass, RequestBuilder<?> other) -
Method Summary
Modifier and TypeMethodDescriptionaddListener(RequestListener<TranscodeType> requestListener) Adds aRequestListenerto the list that will be called in the order they were added when the request ends.apply(BaseRequestOptions<?> requestOptions) Applies the given options to the request.clone()Returns a copy of this request builder with all of the options put so far on this builder.downloadOnly(int width, int height) Deprecated.downloadOnly(Y target) Deprecated.booleanerror(RequestBuilder<TranscodeType> errorBuilder) Sets aRequestBuilderthat is built and run if the load started by thisRequestBuilderfails.Identical to callingerror(RequestBuilder)where theRequestBuilderis the result of callingclone()and removing any existing thumbnail and errorRequestBuilders.protected RequestBuilder<File>inthashCode()into(int width, int height) Deprecated.Usesubmit(int, int)instead.Sets theImageViewthe resource will be loaded into, cancels any existing loads into the view, and frees any resources Glide may have previously loaded into the view so they may be reused.<Y extends Target<TranscodeType>>
Yinto(Y target) Set the target the resource will be loaded into.listener(RequestListener<TranscodeType> requestListener) Sets aRequestListenerto monitor the resource load and removes all previously set listeners (either via this method or fromaddListener(RequestListener).load(byte[] model) Returns a request to load the given byte array.Returns an object to load the givenBitmap.Returns a request builder to load the givenDrawable.Returns a request builder to load the givenUri.Returns a request builder to load the givenFile.Returns a request builder that uses theModelLoaderFactorycurrently registered orIntegerto load the image represented by the givenIntegerresource id.Sets the specific model to load data for.Returns a request builder to load the givenString.Deprecated.TheURLclass has a number of performance problems and should generally be avoided when possible.preload()Preloads the resource into the cache usingTarget.SIZE_ORIGINALas the target width and height.preload(int width, int height) Preloads the resource into the cache using the given width and height.submit()Returns a future that can be used to do a blocking get on a background thread.submit(int width, int height) Returns a future that can be used to do a blocking get on a background thread.thumbnail(float sizeMultiplier) Deprecated.The behavior differences between this method andthumbnail(RequestBuilder)are subtle, hard to understand for users and hard to maintain for developers.thumbnail(RequestBuilder<TranscodeType> thumbnailRequest) Loads and displays the resource retrieved by the given thumbnail request if it finishes before this request.thumbnail(RequestBuilder<TranscodeType>... thumbnails) Recursively appliesthumbnail(RequestBuilder)so that theRequestBuilders are loaded as thumbnails in the given priority order.thumbnail(List<RequestBuilder<TranscodeType>> thumbnails) Recursively appliesthumbnail(RequestBuilder)so that theRequestBuilders are loaded as thumbnails in the given priority order.transition(TransitionOptions<?, ? super TranscodeType> transitionOptions) Sets theTransitionOptionsto use to transition from the placeholder or thumbnail when this load completes.Methods inherited from class com.bumptech.glide.request.BaseRequestOptions
autoClone, centerCrop, centerInside, circleCrop, decode, disallowHardwareConfig, diskCacheStrategy, dontAnimate, dontTransform, downsample, encodeFormat, encodeQuality, error, error, fallback, fallback, fitCenter, format, frame, getDiskCacheStrategy, getErrorId, getErrorPlaceholder, getFallbackDrawable, getFallbackId, getOnlyRetrieveFromCache, getOptions, getOverrideHeight, getOverrideWidth, getPlaceholderDrawable, getPlaceholderId, getPriority, getResourceClass, getSignature, getSizeMultiplier, getTheme, getTransformations, getUseAnimationPool, getUseUnlimitedSourceGeneratorsPool, isAutoCloneEnabled, isDiskCacheStrategySet, isEquivalentTo, isLocked, isMemoryCacheable, isPrioritySet, isSkipMemoryCacheSet, isTransformationAllowed, isTransformationRequired, isTransformationSet, isValidOverride, lock, onlyRetrieveFromCache, optionalCenterCrop, optionalCenterInside, optionalCircleCrop, optionalFitCenter, optionalTransform, optionalTransform, override, override, placeholder, placeholder, priority, selfOrThrowIfLocked, set, signature, sizeMultiplier, skipMemoryCache, theme, timeout, transform, transform, transform, transforms, useAnimationPool, useUnlimitedSourceGeneratorsPool
-
Field Details
-
DOWNLOAD_ONLY_OPTIONS
-
-
Constructor Details
-
RequestBuilder
protected RequestBuilder(@NonNull Glide glide, RequestManager requestManager, Class<TranscodeType> transcodeClass, Context context) -
RequestBuilder
-
-
Method Details
-
apply
@NonNull @CheckResult public RequestBuilder<TranscodeType> apply(@NonNull BaseRequestOptions<?> requestOptions) Applies the given options to the request.As with
BaseRequestOptions.apply(BaseRequestOptions),#applyonly replaces those values that are explicitly set in the givenRequestOptionsobject. If you need to completely reset all previously set options, create a newRequestBuilderinstead of using this method.- Overrides:
applyin classBaseRequestOptions<RequestBuilder<TranscodeType>>- Returns:
- This request builder.
- See Also:
-
transition
@NonNull @CheckResult public RequestBuilder<TranscodeType> transition(@NonNull TransitionOptions<?, ? super TranscodeType> transitionOptions) Sets theTransitionOptionsto use to transition from the placeholder or thumbnail when this load completes.The given
TransitionOptionswill replace anyTransitionOptionsset previously.- Returns:
- This request builder.
-
listener
@NonNull @CheckResult public RequestBuilder<TranscodeType> listener(@Nullable RequestListener<TranscodeType> requestListener) Sets aRequestListenerto monitor the resource load and removes all previously set listeners (either via this method or fromaddListener(RequestListener).Calls to this method will replace previously set listeners. To set multiple listeners, use
addListener(com.bumptech.glide.request.RequestListener<TranscodeType>)instead.- Parameters:
requestListener- The request listener to use.- Returns:
- This request builder.
-
addListener
@NonNull @CheckResult public RequestBuilder<TranscodeType> addListener(@Nullable RequestListener<TranscodeType> requestListener) Adds aRequestListenerto the list that will be called in the order they were added when the request ends.Multiple calls to this method append additional listeners. Previous listeners are not removed. If you want to replace any previously added listeners, use
listener(RequestListener).Listeners track the state of the request started by this particular
builder. When used with the thumbnail APIs (thumbnail(RequestBuilder)) this can start to seem confusing because multiple requests are running and each may succeed or fail, independent of each other. As a rule, Glide does not addRequestListeners to thumbnail requests automatically. That means thatRequestListeners track the state of exactly one request in the chain. For example, if you start a primary request with a single nested thumbnail and you add aRequestListeneronly to the primary request, then theRequestListenerwill only be notified when the primary request succeeds or fails. If the thumbnail succeeds, but the primary request fails, theRequestListeneradded to the primary request will still be called withRequestListener.onLoadFailed(GlideException, Object, Target, boolean). In the same scenario, theRequestListeneradded only to the primary request will not haveRequestListener.onResourceReady(Object, Object, Target, DataSource, boolean)called when the thumbnail request finishes successfully. Similarly, if you add aRequestListeneronly to a thumbnail request, but not the primary request, thatlistenerwill only be called for changes related to the thumbnail request. If the thumbnail request fails, thelisteneradded to the thumbnail request will be immediately called viaRequestListener.onLoadFailed(GlideException, Object, Target, boolean), even though the primary request may eventually succeed. It is perfectly possible to add aRequestListenerto both the primary and a thumbnail request. If you do so, theRequestListenerwill be called independently for each request when it finishes. Keep in mind that if any parent request finishes before its thumbnail request(s), it will attempt to cancel those requests. As a result there's no guarantee that aRequestListeneradded to a thumbnail request will actually be called with either success or failure. These same patterns hold for arbitrarily nested thumbnails. Thelisteneris only called for the requests it is added to and may not be called for every thumbnail request if those requests are cancelled due to the completion of a parent request.The one exception to the rules about thumbnails is
thumbnail(float). In this case we appear to be passingRequestListeners added to the parent request to the generated thumbnail requests. To try to reduce confusion, thethumbnail(float)method has been deprecated. It can be easily replicated usingthumbnail(RequestBuilder)andBaseRequestOptions.sizeMultiplier(float).Often in UIs it's desirable to try to track the overall status of a request, including the thumbnails. For example, you might want to load an image, start an animation if the asynchronous image load succeeds and perform some fallback action if it fails. If you're using a single primary request,
RequestListenerwill work for this. However, if you then decide to try to make things more performant by adding a thumbnail (or multiple thumbnails),RequestListeneris awkward because either you only add it to the main request and it's not called when the thumbnails complete (which defeats the purpose) or it's called for every request and it's hard to keep track of when the overall request has failed. A better option than usingRequestListenerto track the state of the UI then is to useTargetinstead.Target.onResourceReady(Object, Transition)will be called when any thumbnail finishes, which you can use to trigger your animation starting.Target.onLoadFailed(Drawable)will only be called if every request in the chain, including the primary request, fails, which you can use to trigger your fallback behavior. Be sure to pick an appropriateTargetsubclass when possible, likeBitmapImageViewTargetorDrawableImageViewTargetwhen loading intoImageVieworCustomTargetwhen using custom rendering. Don't forget to callsuper()in theImageViewTargets.It's best to create a single instance of an exception handler per type of request (usually activity/fragment) rather than pass one in per request to avoid some redundant object allocation.
- Parameters:
requestListener- The request listener to use. Ifnull, this method is a noop.- Returns:
- This request builder.
-
error
@NonNull public RequestBuilder<TranscodeType> error(@Nullable RequestBuilder<TranscodeType> errorBuilder) Sets aRequestBuilderthat is built and run if the load started by thisRequestBuilderfails.If this
RequestBuilderuses a thumbnail that succeeds the given errorRequestBuilderwill be started anyway if the non-thumbnail request fails.Recursive calls to this method as well as calls to
thumbnail(float)andthumbnail(RequestBuilder)are supported for the given errorRequestBuilder.Unlike
thumbnail(RequestBuilder)andthumbnail(float), no options from this primaryRequestBuilderare propagated to the given errorRequestBuilder. Options like priority, override widths and heights and transitions must be applied independently to the error builder.The given
RequestBuilderwill start and potentially override a fallback drawable if it's set on thisRequestBuilderviaBaseRequestOptions.fallback(android.graphics.drawable.Drawable)orBaseRequestOptions.fallback(int).- Returns:
- This
RequestBuilder.
-
error
Identical to callingerror(RequestBuilder)where theRequestBuilderis the result of callingclone()and removing any existing thumbnail and errorRequestBuilders.Other than thumbnail and error
RequestBuilders, which are removed, all other options are retained from the primary request. However, order matters! Any options applied after this method is called will not be applied to the errorRequestBuilder.WARNING: Calling this method with a
modelwhose type does not match the type of the model passed toload()may be dangerous! Any options that were applied by the various type specificload()methods, likeload(byte[])will be copied to the error request here even if themodelyou pass to this method doesn't match. Similary, options that would be normally applied by type specificload()methods will not be applied to this request. If this behavior is confusing or unexpected, useerror(RequestBuilder)instead. -
thumbnail
@NonNull @CheckResult public RequestBuilder<TranscodeType> thumbnail(@Nullable RequestBuilder<TranscodeType> thumbnailRequest) Loads and displays the resource retrieved by the given thumbnail request if it finishes before this request. Best used for loading thumbnail resources that are smaller and will be loaded more quickly than the full size resource. There are no guarantees about the order in which the requests will actually finish. However, if the thumb request completes after the full request, the thumb resource will never replace the full resource.Recursive calls to thumbnail are supported.
Overrides any previous calls to this method,
thumbnail(float)andthumbnail(RequestBuilder[]).- Parameters:
thumbnailRequest- The request to use to load the thumbnail.- Returns:
- This request builder.
- See Also:
-
thumbnail
@NonNull @CheckResult public RequestBuilder<TranscodeType> thumbnail(@Nullable RequestBuilder<TranscodeType>... thumbnails) Recursively appliesthumbnail(RequestBuilder)so that theRequestBuilders are loaded as thumbnails in the given priority order.thumbnail(RequestBuilder)is applied in the order given so that theRequestBuilderat position 0 has theRequestBuilderat position 1 applied as using its thumbnail method, theRequestBuilderat position 1 has theRequestBuilderat position 2 applied using its thumbnail method and so on.Calling this method with an
nullarray ofRequestBuilderthumbnails or an empty array ofRequestBuilderthumbnails is equivalent to callingthumbnail(RequestBuilder)withnull.Any individual
RequestBuilderin the array of thumbnails provided here may benull.nullRequestBuilders are ignored and excluded from the recursive chain.The
RequestBuilderobjects provided here may be mutated and have any previous calls to this method orthumbnail(RequestBuilder)methods overridden.Overrides any previous calls to
thumbnail(RequestBuilder),thumbnail(float)and this method.- Returns:
- This request builder.
- See Also:
-
thumbnail
@NonNull @CheckResult public RequestBuilder<TranscodeType> thumbnail(@Nullable List<RequestBuilder<TranscodeType>> thumbnails) Recursively appliesthumbnail(RequestBuilder)so that theRequestBuilders are loaded as thumbnails in the given priority order.thumbnail(RequestBuilder)is applied in the order given so that theRequestBuilderat position 0 has theRequestBuilderat position 1 applied as using its thumbnail method, theRequestBuilderat position 1 has theRequestBuilderat position 2 applied using its thumbnail method and so on.Calling this method with a
nulllist ofRequestBuilderthumbnails or an empty list ofRequestBuilderthumbnails is equivalent to callingthumbnail(RequestBuilder)withnull.Any individual
RequestBuilderin the list of thumbnails provided here may benull.nullRequestBuilders are ignored and excluded from the recursive chain.The
RequestBuilderobjects provided here may be mutated and have any previous calls to this method orthumbnail(RequestBuilder)methods overridden.Overrides any previous calls to
thumbnail(RequestBuilder),thumbnail(float)and this method.- Returns:
- This request builder.
- See Also:
-
thumbnail
@NonNull @CheckResult @Deprecated public RequestBuilder<TranscodeType> thumbnail(float sizeMultiplier) Deprecated.The behavior differences between this method andthumbnail(RequestBuilder)are subtle, hard to understand for users and hard to maintain for developers. See the javadoc onlistener(RequestListener)for one concrete example of the behavior differences and complexity introduced by this method. Better consistency and readability can be obtained by callingthumbnail(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.Loads a resource in an identical manner to this request except with the dimensions of the target multiplied by the given size multiplier. If the thumbnail load completes before the full size load, the thumbnail will be shown. If the thumbnail load completes after the full size load, the thumbnail will not be shown.Note - The thumbnail resource will be smaller than the size requested so the target (or
ImageView) must be able to scale the thumbnail appropriately. SeeImageView.ScaleType.Almost all options will be copied from the original load, including the
ModelLoader,ResourceDecoder, andTransformations. However,BaseRequestOptions.placeholder(int)andBaseRequestOptions.error(int), andlistener(RequestListener)will only be used on the full size load and will not be copied for the thumbnail load.Recursive calls to thumbnail are supported.
Overrides any previous calls to this method,
thumbnail(RequestBuilder[]), andthumbnail(RequestBuilder).- Parameters:
sizeMultiplier- The multiplier to apply to theTarget's dimensions when loading the thumbnail.- Returns:
- This request builder.
- See Also:
-
load
Sets the specific model to load data for.- Parameters:
model- The model to load data for, or null.- Returns:
- This request builder.
-
load
Returns an object to load the givenBitmap.It's almost always better to allow Glide to load
Bitmaps than passBitmaps into Glide. If you have a custom way to obtainBitmaps that is not supported by Glide by default, consider registering a customModelLoaderorResourceDecoderinstead of using this method.The
DiskCacheStrategyis set toDiskCacheStrategy.NONE. Previous calls toapply(BaseRequestOptions)or previously appliedDiskCacheStrategys will be overridden by this method. Applying anDiskCacheStrategyother thanDiskCacheStrategy.NONEafter calling this method may result in undefined behavior.In memory caching relies on Object equality. The contents of the
Bitmaps are not compared.- See Also:
-
load
Returns a request builder to load the givenDrawable.It's almost always better to allow Glide to load
Bitmaps than to passBitmaps into Glide using this method . If you have a custom way to obtainBitmaps that is not supported by Glide by default, consider registering a customModelLoaderorResourceDecoderinstead of using this method.The
DiskCacheStrategyis set toDiskCacheStrategy.NONE. Previous calls toapply(BaseRequestOptions)or previously appliedDiskCacheStrategys will be overridden by this method. Applying anDiskCacheStrategyother thanDiskCacheStrategy.NONEafter calling this method may result in undefined behavior.In memory caching relies on Object equality. The contents of the
Drawables are not compared.- See Also:
-
load
Returns a request builder to load the givenString.Note - this method caches data using only the given String as the cache key. If the data is a Uri outside of your control, or you otherwise expect the data represented by the given String to change without the String identifier changing, Consider using
BaseRequestOptions.signature(com.bumptech.glide.load.Key)to mixin a signature you create that identifies the data currently at the given String that will invalidate the cache if that data changes. Alternatively, usingDiskCacheStrategy.NONEand/orBaseRequestOptions.skipMemoryCache(boolean)may be appropriate.If
stringis in fact a resourceUri, you should first parse it to a Uri usingUri.parse(String)and then pass theUritoload(Uri). Doing so will ensure that we respect the appropriate theme / dark / light mode. As an alternative, you can also manually apply the currentResources.ThemeusingBaseRequestOptions.theme(Theme).- Parameters:
string- A file path, or a uri or url handled byUriLoader.- See Also:
-
load
Returns a request builder to load the givenUri.Note - this method caches data at Uris using only the Uri itself as the cache key. The data represented by Uris from some content providers may change without the Uri changing, which means using this method can lead to displaying stale data. Consider using
BaseRequestOptions.signature(com.bumptech.glide.load.Key)to mixin a signature you create based on the data at the given Uri that will invalidate the cache if that data changes. Alternatively, usingDiskCacheStrategy.NONEand/orBaseRequestOptions.skipMemoryCache(boolean)may be appropriate. The only exception to this is that if we recognize the givenurias havingContentResolver.SCHEME_ANDROID_RESOURCE, then we'll applyAndroidResourceSignatureautomatically. If we do so, calls to otherload()methods will not override the automatically applied signature.If
urihas aUri.getScheme()ofContentResolver.SCHEME_ANDROID_RESOURCE, then this method will add theResources.Themeof theContextassociated with thisrequestBuilderso that we can respect themeable attributes and/or light / dark mode. Any call toBaseRequestOptions.theme(Theme)prior to this method call will be overridden. To avoid this, callBaseRequestOptions.theme(Theme)after calling this method with eithernullor theThemeyou'd prefer to use instead. Note that even if you change the theme, theAndroidResourceSignaturewill still be based on theContexttheme.- Parameters:
uri- The Uri representing the image. Must be of a type handled byUriLoader.- See Also:
-
load
Returns a request builder to load the givenFile.Note - this method caches data for Files using only the file path itself as the cache key. The data in the File can change so using this method can lead to displaying stale data. If you expect the data in the File to change, Consider using
BaseRequestOptions.signature(com.bumptech.glide.load.Key)to mixin a signature you create that identifies the data currently in the File that will invalidate the cache if that data changes. Alternatively, usingDiskCacheStrategy.NONEand/orBaseRequestOptions.skipMemoryCache(boolean)may be appropriate.- Parameters:
file- The File containing the image- See Also:
-
load
@NonNull @CheckResult public RequestBuilder<TranscodeType> load(@RawRes @DrawableRes @Nullable Integer resourceId) Returns a request builder that uses theModelLoaderFactorycurrently registered orIntegerto load the image represented by the givenIntegerresource id. Defaults toResourceLoaderto load resource id models.By default this method adds a version code and night mode based signature to the cache key used to cache this resource in Glide. This signature is sufficient to guarantee that end users will see the most up to date versions of your Drawables, but during development if you do not increment your version code before each install and you replace a Drawable with different data without changing the Drawable name, you may see inconsistent cached data. To get around this, consider using
DiskCacheStrategy.NONEviaBaseRequestOptions.diskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy)during development, and re-enabling the defaultDiskCacheStrategy.RESOURCEfor release builds.This method will load non-
Bitmapresources likeVectorDrawables. Although Glide makes a best effort to applyTransformations to theseDrawables by either extracting the underlyingBitmapor by converting theDrawableto aBitmap, Glide is still not able to transform all types of resources. AnimatedDrawables cannot be transformed (other thanGifDrawable). To avoid load failures if aDrawablecan't be transformed, use the optional transformation methods likeBaseRequestOptions.optionalTransform(Class, Transformation).In some cases converting
Drawables toBitmaps may be inefficient. Use this method, especially in conjunction withTransformations with caution for non-BitmapDrawables.This method will add the
Resources.Themeof theContextassociated with thisrequestBuilderso that we can respect themeable attributes and/or light / dark mode. Any call toBaseRequestOptions.theme(Theme)prior to this method call will be overridden. To avoid this, callBaseRequestOptions.theme(Theme)after calling this method with eithernullor theThemeyou'd prefer to use instead. Note that even if you change the theme, theAndroidResourceSignaturewill still be based on theContexttheme.- See Also:
-
load
Deprecated.TheURLclass has a number of performance problems and should generally be avoided when possible. Preferload(android.net.Uri)orload(String).Returns a request builder to load the givenURL.- Parameters:
url- The URL representing the image.- See Also:
-
load
Returns a request to load the given byte array.Note - by default loads for bytes are not cached in either the memory or the disk cache.
- Parameters:
model- the data to load.- See Also:
-
clone
Returns a copy of this request builder with all of the options put so far on this builder.This method returns a "deep" copy in that all non-immutable arguments are copied such that changes to one builder will not affect the other builder. However, in addition to immutable arguments, the current model is not copied so changes to the model will affect both builders.
- Overrides:
clonein classBaseRequestOptions<RequestBuilder<TranscodeType>>
-
into
Set the target the resource will be loaded into.- Parameters:
target- The target to load the resource into.- Returns:
- The given target.
- See Also:
-
into
Sets theImageViewthe resource will be loaded into, cancels any existing loads into the view, and frees any resources Glide may have previously loaded into the view so they may be reused. -
into
Deprecated.Usesubmit(int, int)instead.Returns a future that can be used to do a blocking get on a background thread.- Parameters:
width- The desired width in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)if previously called.height- The desired height in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)} if previously called).- See Also:
-
submit
Returns a future that can be used to do a blocking get on a background thread.This method defaults to
Target.SIZE_ORIGINALfor the width and the height. However, since the width and height will be overridden by values passed toBaseRequestOptions.override(int, int), this method can be used wheneverRequestOptionswith override values are applied, or whenever you want to retrieve the image in its original size.- See Also:
-
submit
Returns a future that can be used to do a blocking get on a background thread.- Parameters:
width- The desired width in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)if previously called.height- The desired height in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)} if previously called).
-
preload
Preloads the resource into the cache using the given width and height.Pre-loading is useful for making sure that resources you are going to to want in the near future are available quickly.
Note - Any thumbnail request that does not complete before the primary request will be cancelled and may not be preloaded successfully. Cancellation of outstanding thumbnails after the primary request succeeds is a common behavior of all Glide requests. We do not try to prevent that behavior here. If you absolutely need all thumbnails to be preloaded individually, make separate preload() requests for each thumbnail (you can still combine them into one call when loading the image(s) into the UI in a subsequent request).
- Parameters:
width- The desired width in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)if previously called.height- The desired height in pixels, orTarget.SIZE_ORIGINAL. This will be overridden byBaseRequestOptions.override(int, int)} if previously called).- Returns:
- A
Targetthat can be used to cancel the load viaRequestManager.clear(Target). - See Also:
-
preload
Preloads the resource into the cache usingTarget.SIZE_ORIGINALas the target width and height. Equivalent to callingpreload(int, int)withTarget.SIZE_ORIGINALas the width and height.- Returns:
- A
Targetthat can be used to cancel the load viaRequestManager.clear(Target) - See Also:
-
downloadOnly
Deprecated.Loads the original unmodified data into the cache and calls the given Target with the cache File.- Type Parameters:
Y- The type of Target.- Parameters:
target- The Target that will receive the cache File when the load completes- Returns:
- The given Target.
-
downloadOnly
Deprecated.Loads the original unmodified data into the cache and returns aFuturethat can be used to retrieve the cache File containing the data.- Parameters:
width- The width in pixels to use to fetch the data.height- The height in pixels to use to fetch the data.- Returns:
- A
Futurethat can be used to retrieve the cache File containing the data.
-
getDownloadOnlyRequest
-
equals
- Overrides:
equalsin classBaseRequestOptions<RequestBuilder<TranscodeType>>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseRequestOptions<RequestBuilder<TranscodeType>>
-
RequestManager.downloadOnly()andsubmit(int, int).