Skip to content

Instantly share code, notes, and snippets.

Avatar

Madushan Siriwardena madushans

  • New Zealand
View GitHub Profile
@madushans
madushans / compose-glide-blurred-load.kt
Last active Jan 10, 2021
Load images with blurred thumbnail load effect using Jetpack Compose, Glide and StateFlow
View compose-glide-blurred-load.kt
// 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 = ...