-
public final class PlaceholderHighlightKt
-
-
Method Summary
Modifier and Type Method Description final static PlaceholderHighlightfade(PlaceholderHighlight.Companion $self, Color highlightColor, InfiniteRepeatableSpec<Float> animationSpec)Creates a Fade brush with the given initial and target colors. final static PlaceholderHighlightshimmer(PlaceholderHighlight.Companion $self, Color highlightColor, InfiniteRepeatableSpec<Float> animationSpec, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progressForMaxAlpha)Creates a PlaceholderHighlight which 'shimmers', using the given highlightColor. -
-
Method Detail
-
fade
final static PlaceholderHighlight fade(PlaceholderHighlight.Companion $self, Color highlightColor, InfiniteRepeatableSpec<Float> animationSpec)
Creates a Fade brush with the given initial and target colors.
- Parameters:
highlightColor- the color of the highlight which is faded in/out.animationSpec- the AnimationSpec to configure the animation.
-
shimmer
final static PlaceholderHighlight shimmer(PlaceholderHighlight.Companion $self, Color highlightColor, InfiniteRepeatableSpec<Float> animationSpec, @FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progressForMaxAlpha)
Creates a PlaceholderHighlight which 'shimmers', using the given highlightColor.
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.
- Parameters:
highlightColor- the color of the highlight 'shimmer'.animationSpec- the AnimationSpec to configure the animation.progressForMaxAlpha- The progress where the shimmer should be at it's peak opacity.
-
-
-
-