shimmer

@Composable()
fun PlaceholderHighlight.Companion.shimmer(animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.shimmerAnimationSpec, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()progressForMaxAlpha: Float = 0.6f): PlaceholderHighlight

Creates a PlaceholderHighlight which 'shimmers', using a default color.

The highlight starts at the top-start, and then grows to the bottom-end during the animation. During that time it is also faded in, from 0f..progressForMaxAlpha, and then faded out from progressForMaxAlpha..1f.

Samples

com.google.accompanist.sample.placeholder.DocSample_Material_PlaceholderShimmer

Parameters

animationSpec

the AnimationSpec to configure the animation.

progressForMaxAlpha

The progress where the shimmer should be at it's peak opacity. Defaults to 0.6f.