Package com.bumptech.glide.request
Class RequestOptions
- java.lang.Object
-
- com.bumptech.glide.request.BaseRequestOptions<RequestOptions>
-
- com.bumptech.glide.request.RequestOptions
-
- All Implemented Interfaces:
java.lang.Cloneable
public class RequestOptions extends BaseRequestOptions<RequestOptions>
Provides type independent options to customize loads with Glide.Non-final to allow Glide's generated classes to be assignable to their non-generated equivalents.
-
-
Constructor Summary
Constructors Constructor Description RequestOptions()
-
Method Summary
-
Methods inherited from class com.bumptech.glide.request.BaseRequestOptions
apply, autoClone, centerCrop, centerInside, circleCrop, clone, 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, 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
-
-
-
-
Method Detail
-
sizeMultiplierOf
@NonNull @CheckResult public static RequestOptions sizeMultiplierOf(@FloatRange(from=0.0,to=1.0) float sizeMultiplier)
Returns aRequestOptionsobject withBaseRequestOptions.sizeMultiplier(float)set.
-
diskCacheStrategyOf
@NonNull @CheckResult public static RequestOptions diskCacheStrategyOf(@NonNull DiskCacheStrategy diskCacheStrategy)
Returns aRequestOptionsobject withBaseRequestOptions.diskCacheStrategy(DiskCacheStrategy)set.
-
priorityOf
@NonNull @CheckResult public static RequestOptions priorityOf(@NonNull Priority priority)
Returns aRequestOptionsobject withBaseRequestOptions.priority(Priority)} set.
-
placeholderOf
@NonNull @CheckResult public static RequestOptions placeholderOf(@Nullable android.graphics.drawable.Drawable placeholder)
Returns aRequestOptionsobject withBaseRequestOptions.placeholder(Drawable)set.
-
placeholderOf
@NonNull @CheckResult public static RequestOptions placeholderOf(@DrawableRes int placeholderId)
Returns aRequestOptionsobject withBaseRequestOptions.placeholder(int)set.
-
errorOf
@NonNull @CheckResult public static RequestOptions errorOf(@Nullable android.graphics.drawable.Drawable errorDrawable)
Returns aRequestOptionsobject withBaseRequestOptions.error(Drawable)set.
-
errorOf
@NonNull @CheckResult public static RequestOptions errorOf(@DrawableRes int errorId)
Returns aRequestOptionsobject withBaseRequestOptions.error(int)} set.
-
skipMemoryCacheOf
@NonNull @CheckResult public static RequestOptions skipMemoryCacheOf(boolean skipMemoryCache)
Returns aRequestOptionsobject withBaseRequestOptions.skipMemoryCache(boolean)set.
-
overrideOf
@NonNull @CheckResult public static RequestOptions overrideOf(int width, int height)
Returns aRequestOptionsobject withBaseRequestOptions.override(int, int)} set.
-
overrideOf
@NonNull @CheckResult public static RequestOptions overrideOf(int size)
Returns aRequestOptionswithBaseRequestOptions.override(int, int)set where both the width and height are the given size.
-
signatureOf
@NonNull @CheckResult public static RequestOptions signatureOf(@NonNull Key signature)
Returns aRequestOptionsobject withBaseRequestOptions.signatureset.
-
fitCenterTransform
@NonNull @CheckResult public static RequestOptions fitCenterTransform()
Returns aRequestOptionsobject withBaseRequestOptions.fitCenter()set.
-
centerInsideTransform
@NonNull @CheckResult public static RequestOptions centerInsideTransform()
Returns aRequestOptionsobject withBaseRequestOptions.centerInside()set.
-
centerCropTransform
@NonNull @CheckResult public static RequestOptions centerCropTransform()
Returns aRequestOptionsobject withBaseRequestOptions.centerCrop()set.
-
circleCropTransform
@NonNull @CheckResult public static RequestOptions circleCropTransform()
Returns aRequestOptionsobject withBaseRequestOptions.circleCrop()set.
-
bitmapTransform
@NonNull @CheckResult public static RequestOptions bitmapTransform(@NonNull Transformation<android.graphics.Bitmap> transformation)
Returns aRequestOptionsobject withBaseRequestOptions.transform(Transformation)set.
-
noTransformation
@NonNull @CheckResult public static RequestOptions noTransformation()
Returns aRequestOptionsobject withBaseRequestOptions.dontTransform()set.
-
option
@NonNull @CheckResult public static <T> RequestOptions option(@NonNull Option<T> option, @NonNull T value)
Returns aRequestOptionsobject with the givenOptionset viaBaseRequestOptions.set(Option, Object).
-
decodeTypeOf
@NonNull @CheckResult public static RequestOptions decodeTypeOf(@NonNull java.lang.Class<?> resourceClass)
Returns aRequestOptionsobject withBaseRequestOptions.decode(Class)set.
-
formatOf
@NonNull @CheckResult public static RequestOptions formatOf(@NonNull DecodeFormat format)
Returns aRequestOptionsobject withBaseRequestOptions.format(DecodeFormat)set.
-
frameOf
@NonNull @CheckResult public static RequestOptions frameOf(@IntRange(from=0L) long frameTimeMicros)
Returns aRequestOptionsobject withBaseRequestOptions.frame(long)set.
-
downsampleOf
@NonNull @CheckResult public static RequestOptions downsampleOf(@NonNull DownsampleStrategy strategy)
Returns aRequestOptionsobject withBaseRequestOptions.downsample(DownsampleStrategy)set.
-
timeoutOf
@NonNull @CheckResult public static RequestOptions timeoutOf(@IntRange(from=0L) int timeout)
Returns aRequestOptionsobject withBaseRequestOptions.timeout(int)set.
-
encodeQualityOf
@NonNull @CheckResult public static RequestOptions encodeQualityOf(@IntRange(from=0L,to=100L) int quality)
Returns aRequestOptionswithBaseRequestOptions.encodeQuality(int)called with the given quality.
-
encodeFormatOf
@NonNull @CheckResult public static RequestOptions encodeFormatOf(@NonNull android.graphics.Bitmap.CompressFormat format)
Returns aRequestOptionswithBaseRequestOptions.encodeFormat(android.graphics.Bitmap.CompressFormat)called with the given format.
-
noAnimation
@NonNull @CheckResult public static RequestOptions noAnimation()
Returns a newRequestOptionswithBaseRequestOptions.dontAnimate()called.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classBaseRequestOptions<RequestOptions>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBaseRequestOptions<RequestOptions>
-
-