Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created August 1, 2021 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skydoves/e3a99c9be9246f89e95817bab90986f6 to your computer and use it in GitHub Desktop.
Save skydoves/e3a99c9be9246f89e95817bab90986f6 to your computer and use it in GitHub Desktop.
CoilImageShimmer
CoilImage(
imageModel = poster.poster,
modifier = modifier,
// shows a shimmering effect when loading an image.
shimmerParams = ShimmerParams(
baseColor = MaterialTheme.colors.background,
highlightColor = shimmerHighLight,
durationMillis = 350,
dropOff = 0.65f,
tilt = 20f
),
// shows an error text message when request failed.
failure = {
Text(text = "image request failed.")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment