-
@Stable()@Deprecated(message = accompanist/placeholder is deprecated and the API is no longer maintained. We recommend forking the implementation and customising it to your needs. For more information please visit https://google.github.io/accompanist/placeholder ) public interface PlaceholderHighlight
A class which provides a brush to paint placeholder based on progress.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPlaceholderHighlight.Companion
-
Method Summary
Modifier and Type Method Description abstract Brushbrush(@FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Size size)Return a Brush to draw for the given progress and size. abstract Floatalpha(Float progress)Return the desired alpha value used for drawing the Brush returned from brush. abstract InfiniteRepeatableSpec<Float>getAnimationSpec()The optional AnimationSpec to use when running the animation for this highlight. -
-
Method Detail
-
brush
abstract Brush brush(@FloatRange(from = 0.0.toDouble(), to = 1.0.toDouble()) Float progress, Size size)
- Parameters:
progress- the current animated progress in the range of 0f..1f.size- The size of the current layout to draw in.
-
alpha
abstract Float alpha(Float progress)
Return the desired alpha value used for drawing the Brush returned from brush.
- Parameters:
progress- the current animated progress in the range of 0f..1f.
-
getAnimationSpec
abstract InfiniteRepeatableSpec<Float> getAnimationSpec()
The optional AnimationSpec to use when running the animation for this highlight.
-
-
-
-