Constructor and Description |
---|
Builder(int resourceId)
Start building a request using the specified resource ID.
|
Builder(android.net.Uri uri)
Start building a request using the specified
Uri . |
Modifier and Type | Method and Description |
---|---|
Request |
build()
Create the immutable
Request object. |
Request.Builder |
centerCrop()
Crops an image inside of the bounds specified by
resize(int, int) rather than
distorting the aspect ratio. |
Request.Builder |
centerCrop(int alignGravity)
Crops an image inside of the bounds specified by
resize(int, int) rather than
distorting the aspect ratio. |
Request.Builder |
centerInside()
Centers an image inside of the bounds specified by
resize(int, int) . |
Request.Builder |
clearCenterCrop()
Clear the center crop transformation flag, if set.
|
Request.Builder |
clearCenterInside()
Clear the center inside transformation flag, if set.
|
Request.Builder |
clearOnlyScaleDown()
Clear the onlyScaleUp flag, if set.
|
Request.Builder |
clearResize()
Clear the resize transformation, if any.
|
Request.Builder |
clearRotation()
Clear the rotation transformation, if any.
|
Request.Builder |
config(android.graphics.Bitmap.Config config)
Decode the image using the specified config.
|
Request.Builder |
onlyScaleDown()
Only resize an image if the original image size is bigger than the target size
specified by
resize(int, int) . |
Request.Builder |
priority(Picasso.Priority priority)
Execute request using the specified priority.
|
Request.Builder |
purgeable() |
Request.Builder |
resize(int targetWidth,
int targetHeight)
Resize the image to the specified size in pixels.
|
Request.Builder |
rotate(float degrees)
Rotate the image by the specified degrees.
|
Request.Builder |
rotate(float degrees,
float pivotX,
float pivotY)
Rotate the image by the specified degrees around a pivot point.
|
Request.Builder |
setResourceId(int resourceId)
Set the target image resource ID.
|
Request.Builder |
setUri(android.net.Uri uri)
Set the target image Uri.
|
Request.Builder |
stableKey(java.lang.String stableKey)
Set the stable key to be used instead of the URI or resource ID when caching.
|
Request.Builder |
transform(java.util.List<? extends Transformation> transformations)
Add a list of custom transformations to be applied to the image.
|
Request.Builder |
transform(Transformation transformation)
Add a custom transformation to be applied to the image.
|
public Builder(android.net.Uri uri)
Uri
.public Builder(int resourceId)
public Request.Builder setUri(android.net.Uri uri)
This will clear an image resource ID if one is set.
public Request.Builder setResourceId(int resourceId)
This will clear an image Uri if one is set.
public Request.Builder stableKey(java.lang.String stableKey)
public Request.Builder resize(int targetWidth, int targetHeight)
public Request.Builder clearResize()
public Request.Builder centerCrop()
resize(int, int)
rather than
distorting the aspect ratio. This cropping technique scales the image so that it fills the
requested bounds and then crops the extra.public Request.Builder centerCrop(int alignGravity)
resize(int, int)
rather than
distorting the aspect ratio. This cropping technique scales the image so that it fills the
requested bounds, aligns it using provided gravity parameter and then crops the extra.public Request.Builder clearCenterCrop()
public Request.Builder centerInside()
resize(int, int)
. This scales
the image so that both dimensions are equal to or less than the requested bounds.public Request.Builder clearCenterInside()
public Request.Builder onlyScaleDown()
resize(int, int)
.public Request.Builder clearOnlyScaleDown()
public Request.Builder rotate(float degrees)
public Request.Builder rotate(float degrees, float pivotX, float pivotY)
public Request.Builder clearRotation()
public Request.Builder purgeable()
public Request.Builder config(android.graphics.Bitmap.Config config)
public Request.Builder priority(Picasso.Priority priority)
public Request.Builder transform(Transformation transformation)
Custom transformations will always be run after the built-in transformations.
public Request.Builder transform(java.util.List<? extends Transformation> transformations)
Custom transformations will always be run after the built-in transformations.