Package com.google.accompanist.placeholder

Types

PlaceholderDefaults
Link copied to clipboard
object PlaceholderDefaults
Contains default values used by Modifier.placeholder and PlaceholderHighlight.
PlaceholderHighlight
Link copied to clipboard
interface PlaceholderHighlight
A class which provides a brush to paint placeholder based on progress.

Functions

fade
Link copied to clipboard
fun PlaceholderHighlight.Companion.fade(highlightColor: Color, animationSpec: InfiniteRepeatableSpec<Float> = PlaceholderDefaults.fadeAnimationSpec): PlaceholderHighlight
Creates a Fade brush with the given initial and target colors.
placeholder
Link copied to clipboard
fun Modifier.placeholder(visible: Boolean, color: Color, shape: Shape = RectangleShape, highlight: PlaceholderHighlight? = null, placeholderFadeTransitionSpec: @Composable() Transition.Segment<Boolean>.() -> FiniteAnimationSpec<Float> = { spring() }, contentFadeTransitionSpec: @Composable() Transition.Segment<Boolean>.() -> FiniteAnimationSpec<Float> = { spring() }): Modifier
Draws some skeleton UI which is typically used whilst content is 'loading'.
shimmer
Link copied to clipboard
fun PlaceholderHighlight.Companion.shimmer(highlightColor: Color, 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 the given highlightColor.