Package com.cloudinary.android.download
Interface DownloadRequestBuilder
public interface DownloadRequestBuilder
Builds a download request.
-
Method Summary
Modifier and Type Method Description DownloadRequestBuildercallback(DownloadRequestCallback callback)Set a callback to be called for the result of the download request.DownloadRequestinto(android.widget.ImageView imageView)Set the targetImageViewto load the resource into and start the operation.DownloadRequestBuilderload(int resource)Load the request with a resource id.DownloadRequestBuilderload(java.lang.String source)Load the request with a String source.DownloadRequestBuilderplaceholder(int resourceId)Sets an Android resource id for aDrawableresource to display while a resource is loading.DownloadRequestBuilderresponsive(ResponsiveUrl responsiveUrl)Set aResponsiveUrlthat will be used to generate the url with.DownloadRequestBuilderresponsive(ResponsiveUrl.Preset responsivePreset)Set aResponsiveUrl.Presetthat will be used to generate the url with.DownloadRequestBuildertransformation(com.cloudinary.Transformation transformation)Set aTransformationthat will be used to generate the url with.
-
Method Details
-
load
Load the request with a resource id.- Returns:
- Itself for chaining.
-
load
Load the request with a String source. The source can either be a remote url, or a cloudinary publicId. In the case of a remote url, all cloudinary related builder options will not take place.- Returns:
- Itself for chaining.
-
transformation
Set aTransformationthat will be used to generate the url with. Only applies ifload(String)was called with a cloudinary publicId.- Returns:
- Itself for chaining.
-
responsive
Set aResponsiveUrlthat will be used to generate the url with. Only applies ifload(String)was called with a cloudinary publicId.- Returns:
- Itself for chaining
-
responsive
Set aResponsiveUrl.Presetthat will be used to generate the url with. Only applies ifload(String)was called with a cloudinary publicId.- Returns:
- Itself for chaining
-
placeholder
Sets an Android resource id for aDrawableresource to display while a resource is loading.- Parameters:
resourceId- The id of the resource to use as a placeholder- Returns:
- Itself for chaining.
-
callback
Set a callback to be called for the result of the download request.- Parameters:
callback- The callback to be called for the result of the download request.- Returns:
- Itself for chaining.
-
into
Set the targetImageViewto load the resource into and start the operation.- Parameters:
imageView- TheImageViewthe resource will be loaded into.- Returns:
- The dispatched request.
-