Package com.stripe.android.uicore.image

Types

Link copied to clipboard
class ImageLruDiskCache(    context: Context,     cacheFolder: String,     maxSizeBytes: Long = 10L * 1024 * 1024,     compressFormat: Bitmap.CompressFormat = CompressFormat.JPEG,     mCompressQuality: Int = 70)

Implementation of disk cache based on DiskLruCache.

Link copied to clipboard
class ImageLruMemoryCache(val maxSize: Int = (Runtime.getRuntime().maxMemory() / 1024).toInt() / 8)

Implementation of in-memory cache based on LruCache.

Link copied to clipboard
class NetworkImageDecoder
Link copied to clipboard
class StripeImageLoader(    context: Context,     logger: Logger = Logger.getInstance(context.isDebuggable()),     memoryCache: ImageLruMemoryCache? = ImageLruMemoryCache(),     networkImageDecoder: NetworkImageDecoder = NetworkImageDecoder(),     diskCache: ImageLruDiskCache? = ImageLruDiskCache( context = context, cacheFolder = "stripe_image_cache" ))

Image loader that fetches images from memory, disk or network and runs cache policy accordingly.

Functions

Link copied to clipboard
fun StripeImage(    url: String,     placeholder: Painter,     imageLoader: StripeImageLoader,     contentDescription: String?,     modifier: Modifier = Modifier,     contentScale: ContentScale = ContentScale.Fit)

A composable that executes an image request asynchronously using the provided StripeImageLoader and renders the result.