DataSourceBitmapLoader
@UnstableApi
class DataSourceBitmapLoader : BitmapLoader
A BitmapLoader implementation that uses a DataSource to support fetching images from URIs and BitmapFactory to load them into Bitmap.
Loading tasks are delegated to a ListeningExecutorService defined during construction. If no executor service is passed, all tasks are delegated to a single-thread executor service that is shared between instances of this class.
Summary
Nested types |
|---|
|
A builder for |
Constants |
|
|---|---|
const Supplier<ListeningExecutorService!>! |
Public constructors |
|---|
This function is deprecated. Use |
This function is deprecated. Use |
This function is deprecated. Use |
This function is deprecated. Use |
This function is deprecated. Use |
Public functions |
|
|---|---|
ListenableFuture<Bitmap!>! |
decodeBitmap(data: ByteArray!)Decodes an image from compressed binary data. |
ListenableFuture<Bitmap!>! |
loadBitmap(uri: Uri!)Loads an image from |
Boolean |
supportsMimeType(mimeType: String!)Returns whether the given |
Inherited functions |
||
|---|---|---|
|
Constants
Public constructors
DataSourceBitmapLoader
DataSourceBitmapLoader(
listeningExecutorService: ListeningExecutorService!,
dataSourceFactory: DataSource.Factory!
)
DataSourceBitmapLoader
DataSourceBitmapLoader(
listeningExecutorService: ListeningExecutorService!,
dataSourceFactory: DataSource.Factory!,
options: BitmapFactory.Options?
)
DataSourceBitmapLoader
DataSourceBitmapLoader(
listeningExecutorService: ListeningExecutorService!,
dataSourceFactory: DataSource.Factory!,
options: BitmapFactory.Options?,
maximumOutputDimension: Int
)
Public functions
decodeBitmap
fun decodeBitmap(data: ByteArray!): ListenableFuture<Bitmap!>!
Decodes an image from compressed binary data.
supportsMimeType
fun supportsMimeType(mimeType: String!): Boolean
Returns whether the given mimeType is supported.