setExecutor

public void setExecutor(Executor executor)

Provide an Executor to be used for loading images. By default, THREAD_POOL_EXECUTOR is used to minimise contention with other background work the app is doing. You can also choose to use SERIAL_EXECUTOR if you want to limit concurrent background tasks. Alternatively you can supply an Executor of your own to avoid any contention. It is strongly recommended to use a single executor instance for the life of your application, not one per view instance.

Warning: If you are using a custom implementation of ImageRegionDecoder, and you supply an executor with more than one thread, you must make sure your implementation supports multi-threaded bitmap decoding or has appropriate internal synchronization. From SDK 21, Android's android.graphics.BitmapRegionDecoder uses an internal lock so it is thread safe but there is no advantage to using multiple threads.

Parameters

executor

an Executor for image loading.