public static class

MediaVariations.Builder

extends Object
java.lang.Object
   ↳ com.facebook.imagepipeline.request.MediaVariations.Builder

Summary

Public Methods
MediaVariations.Builder addVariant(Uri uri, int width, int height, ImageRequest.CacheChoice cacheChoice)
MediaVariations.Builder addVariant(Uri uri, int width, int height)
MediaVariations build()
MediaVariations.Builder setForceRequestForSpecifiedUri(boolean forceRequestForSpecifiedUri)
Sets whether the URI specified in the image request should be downloaded, even if another cached image appears to be big enough for the request.
MediaVariations.Builder setSource(String source)
Sets the source of these variations.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public MediaVariations.Builder addVariant (Uri uri, int width, int height, ImageRequest.CacheChoice cacheChoice)

public MediaVariations.Builder addVariant (Uri uri, int width, int height)

public MediaVariations build ()

public MediaVariations.Builder setForceRequestForSpecifiedUri (boolean forceRequestForSpecifiedUri)

Sets whether the URI specified in the image request should be downloaded, even if another cached image appears to be big enough for the request. This may be useful for example if the original image should be saved in encoded format but the original size is unknown.

In this case, whatever other image is found may still be returned as a non-final placeholder.

public MediaVariations.Builder setSource (String source)

Sets the source of these variations.

It is not intended that uses of Fresco will set this manually. It's intended to be set within the library so that logging events can differentiate between variations defined in a request from those using the index database.