-
public final class ShimmerTheme
-
-
Field Summary
Fields Modifier and Type Field Description private final AnimationSpec<Float>animationSpecprivate final BlendModeblendModeprivate final Floatrotationprivate final List<Color>shaderColorsprivate final List<Float>shaderColorStopsprivate final DpshimmerWidth
-
Method Summary
Modifier and Type Method Description final AnimationSpec<Float>getAnimationSpec()The AnimationSpec which will be used for the traversal. final BlendModegetBlendMode()The BlendMode used in the shimmer's androidx.compose.ui.graphics.Paint. final FloatgetRotation()Describes the orientation of the shimmer in degrees. final List<Color>getShaderColors()The shaderColors can be used to control the colors and alpha values of the shimmer. final List<Float>getShaderColorStops()See docs of shaderColors. final DpgetShimmerWidth()Controls the width used to distribute the shaderColors. -
-
Method Detail
-
getAnimationSpec
final AnimationSpec<Float> getAnimationSpec()
The AnimationSpec which will be used for the traversal. Use an infinite spec to repeat shimmering.
-
getBlendMode
final BlendMode getBlendMode()
The BlendMode used in the shimmer's androidx.compose.ui.graphics.Paint. Have a look at the theming samples to get an idea on how to utilize the blend mode.
-
getRotation
final Float getRotation()
Describes the orientation of the shimmer in degrees. Zero is thereby defined as shimmer traversing from the left to the right. The rotation is applied clockwise. Only values >= 0 will be accepted.
-
getShaderColors
final List<Color> getShaderColors()
The shaderColors can be used to control the colors and alpha values of the shimmer. The size of the list has to be kept in sync with the shaderColorStops. Consult the docs of the androidx.compose.ui.graphics.LinearGradientShader for more information and have a look at the theming samples.
-
getShaderColorStops
final List<Float> getShaderColorStops()
See docs of shaderColors.
-
getShimmerWidth
final Dp getShimmerWidth()
Controls the width used to distribute the shaderColors.
-
-
-
-