Constructor and Description |
---|
Builder(android.content.Context context)
Start building a new
Picasso instance. |
Modifier and Type | Method and Description |
---|---|
Picasso.Builder |
addRequestHandler(RequestHandler requestHandler)
Register a
RequestHandler . |
Picasso |
build()
Create the
Picasso instance. |
Picasso.Builder |
defaultBitmapConfig(android.graphics.Bitmap.Config bitmapConfig)
Specify the default
Bitmap.Config used when decoding images. |
Picasso.Builder |
downloader(Downloader downloader)
Specify the
Downloader that will be used for downloading images. |
Picasso.Builder |
executor(java.util.concurrent.ExecutorService executorService)
Specify the executor service for loading images in the background.
|
Picasso.Builder |
indicatorsEnabled(boolean enabled)
Toggle whether to display debug indicators on images.
|
Picasso.Builder |
listener(Picasso.Listener listener)
Specify a listener for interesting events.
|
Picasso.Builder |
loggingEnabled(boolean enabled)
Toggle whether debug logging is enabled.
|
Picasso.Builder |
memoryCache(Cache memoryCache)
Specify the memory cache used for the most recent images.
|
Picasso.Builder |
requestTransformer(Picasso.RequestTransformer transformer)
Specify a transformer for all incoming requests.
|
public Builder(android.content.Context context)
Picasso
instance.public Picasso.Builder defaultBitmapConfig(android.graphics.Bitmap.Config bitmapConfig)
Bitmap.Config
used when decoding images. This can be overridden
on a per-request basis using config(..)
.public Picasso.Builder downloader(Downloader downloader)
Downloader
that will be used for downloading images.public Picasso.Builder executor(java.util.concurrent.ExecutorService executorService)
Note: Calling shutdown()
will not shutdown supplied executors.
public Picasso.Builder memoryCache(Cache memoryCache)
public Picasso.Builder listener(Picasso.Listener listener)
public Picasso.Builder requestTransformer(Picasso.RequestTransformer transformer)
NOTE: This is a beta feature. The API is subject to change in a backwards incompatible way at any time.
public Picasso.Builder addRequestHandler(RequestHandler requestHandler)
RequestHandler
.public Picasso.Builder indicatorsEnabled(boolean enabled)
public Picasso.Builder loggingEnabled(boolean enabled)
WARNING: Enabling this will result in excessive object allocation. This should be only
be used for debugging purposes. Do NOT pass BuildConfig.DEBUG
.