Skip to content

Instantly share code, notes, and snippets.

View madushans's full-sized avatar

Madushan Siriwardena madushans

View GitHub Profile
@madushans
madushans / compose-glide-blurred-load.kt
Last active January 9, 2024 20:43
Load images with blurred thumbnail load effect using Jetpack Compose, Glide and StateFlow
// Adapted from https://gist.github.com/lelandrichardson/de674fe6788d922fc84362fdae530464
@Composable
fun ExampleUsage(){
GlideImage(src = "source-path",
blurThumbSrc = "fast-to-load-small-thumbnail-path-for-blur effect"
){imageBitmap ->
if (imageBitmap != null) {
Image(bitmap = imageBitmap,
// modifier = ...