Skip to content
Végh Tamás edited this page Mar 8, 2018 · 2 revisions

Welcome to the ShimmerLayout wiki!

Attributes

This page sole purpose is to list the different attributes You can use to customize the Shimmer animation.

Shimmer color

shimmer_color attribute defines the color of the Shimmer line. To be exact, the center of it will be colored with this color and towards the edges, it will have the same color just with decreased alpha value.

Default value: #A2878787

Shimmer animation duration

shimmer_animation_duration defines the duration of the animation in milliseconds.

Default value: 1500

Shimmer autostart

shimmer_auto_start defines whether the animation should start automatically without calling the startShimmerAnimation method.

Default value: false

Shimmer angle

shimmer_angle defines the angle of the Shimmer line. The minimum value for this attribute is -45, the maximum is 45. Anything outside of this interval will cause IllegalArgumentException.

Default value: 20

Shimmer mask width

The Shimmer line width is half of the layout's width when the angle is 0. However, the gradient itself occupies only 0.5 part of this width. shimmer_mask_width attribute can increase the gradient width. So when 1 value is given to this attribute, the gradient will occupy half of the layout's width.

Default value: 0.5

Shimmer center color width

The gradient in the Shimmer line starts with a transparent edge and towards the center, it will reach the color given with the shimmer_color attribute. This center, however, is not constant 1 pixel or 1% of the whole gradient line, you can modify the width of it with the shimmer_gradient_center_color_width attribute. For example, the if the value of this attribute is 0.5, then half of the Shimmer line's width will have a constant color.

Default value: 0.1

Reversed shimmer animation

shimmer_reverse_animation defines whether the animation should be reversed. If it is true, then the animation starts from the right side of the View.

Default value: false