Shimmer is a java library that provides an easy way to add a shimmer effect to any view in your Android app. It is useful as an unobtrusive loading indicator. It was originally developed for Facebook Home.
Shimmer for Android is implemented as a layout, which means that you can simply nest any view inside a ShimmerFrameLayout tag, and call to start the animation from your code. That's all that is required. The layout will use the values you specify either on the tag (using custom attributes) or programmatically in your code, and generate an animation on the fly. See the API reference for further details.
- Auto Start - Automatically start the animation when the view is shown, or not.
- Base Alpha
- Alpha used to render the base view i.e. the unhighlighted view over which the highlight is drawn.
- Define the time it takes for the highlight to move from one end of the layout to the other.
- Repeat Count - Number of times of the current animation will repeat.
- Repeat Delay
- Delay after which the current animation will repeat.
- Repeat Mode
- What the animation should do after reaching the end, either restart from the beginning or reverse back towards it.
- Mask Shape - Shape of the highlight mask, either with a linear or a circular gradient.
- Angle - Define the angle at which the highlight mask is animated, from left-to-right, top-to-bottom etc.
- Control the size of the fading edge of the highlight.
- Control the brightness of the highlight at the center
- Define the angle at which the highlight is tilted, measured in degrees
- Fixed Width, Height
- Fixed sized highlight mask, if set, overrides the relative size value
- Relative Width, Height - Size of the highlight mask, relative to the layout it is applied to.
SDK for Android
This is the initial public release of Shimmer for Android.