DataSourceBitmapLoader.Builder


class DataSourceBitmapLoader.Builder


A builder for DataSourceBitmapLoader instances.

Summary

Public constructors

Builder(context: Context!)

Creates a builder.

Public functions

DataSourceBitmapLoader!

Builds a DataSourceBitmapLoader.

DataSourceBitmapLoader.Builder!

Sets the BitmapFactory.Options to be used for decoding bitmaps.

DataSourceBitmapLoader.Builder!

Sets the DataSource.Factory to be used to create DataSource instances for loading bitmaps.

DataSourceBitmapLoader.Builder!

Sets the ListeningExecutorService to be used for loading bitmaps.

DataSourceBitmapLoader.Builder!

Sets whether the Bitmap should be converted to an immutable, sharable instance that is most efficient for repeated transfer over binder interfaces.

DataSourceBitmapLoader.Builder!

Sets the maximum output dimension for decoded bitmaps.

Public constructors

Builder

Builder(context: Context!)

Creates a builder.

Parameters
context: Context!

The context.

Public functions

setBitmapFactoryOptions

@CanIgnoreReturnValue
fun setBitmapFactoryOptions(options: BitmapFactory.Options?): DataSourceBitmapLoader.Builder!

Sets the BitmapFactory.Options to be used for decoding bitmaps.

Parameters
options: BitmapFactory.Options?

A BitmapFactory.Options.

Returns
DataSourceBitmapLoader.Builder!

This builder.

setDataSourceFactory

@CanIgnoreReturnValue
fun setDataSourceFactory(dataSourceFactory: DataSource.Factory!): DataSourceBitmapLoader.Builder!

Sets the DataSource.Factory to be used to create DataSource instances for loading bitmaps.

If not set, a DefaultDataSource.Factory will be used.

Parameters
dataSourceFactory: DataSource.Factory!

A DataSource.Factory.

Returns
DataSourceBitmapLoader.Builder!

This builder.

setExecutorService

@CanIgnoreReturnValue
fun setExecutorService(listeningExecutorService: ListeningExecutorService!): DataSourceBitmapLoader.Builder!

Sets the ListeningExecutorService to be used for loading bitmaps.

If not set, DEFAULT_EXECUTOR_SERVICE will be used.

Parameters
listeningExecutorService: ListeningExecutorService!

A ListeningExecutorService.

Returns
DataSourceBitmapLoader.Builder!

This builder.

setMakeShared

@CanIgnoreReturnValue
fun setMakeShared(makeShared: Boolean): DataSourceBitmapLoader.Builder!

Sets whether the Bitmap should be converted to an immutable, sharable instance that is most efficient for repeated transfer over binder interfaces.

Parameters
makeShared: Boolean

Whether to make the Bitmap shared.

Returns
DataSourceBitmapLoader.Builder!

This builder.

See also
makeShared

setMaximumOutputDimension

@CanIgnoreReturnValue
fun setMaximumOutputDimension(maximumOutputDimension: Int): DataSourceBitmapLoader.Builder!

Sets the maximum output dimension for decoded bitmaps.

Parameters
maximumOutputDimension: Int

The maximum output dimension in pixels.

Returns
DataSourceBitmapLoader.Builder!

This builder.