Shimmer Effect for Android
Shimmering is an easy and unobtrusive loading animation developed by Facebook in their web, iOS and Android apps. It is a very clean and elegant way to express that your content will be ready in a couple of seconds. Over a year ago, Facebook released this shimmering effect source code for iOS, and same thing happened for Android, some months ago. They gave us a convenient library that can be easily integrated to your applications too. So let's start with a demo.


Add the library


Add this line to your app/build.gradle
compile 'com.facebook.shimmer:shimmer:0.1.0@aar'

Wrap the views in ShimmerFrameLayout


ShimmerFrameLayout acts as a FrameLayout with all the child views will get that shimmer effect.
<com.facebook.shimmer.ShimmerFrameLayout
    android:id="@+id/shimmerlayout"
    shimmer:duration="3000"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#222">

    <TextView
        android:id="@+id/text"
        android:textColor="#fff"
        android:textSize="55sp"
        android:background="#222"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

</com.facebook.shimmer.ShimmerFrameLayout>

Start the animation in your activity


Call startShimmerAnimation() on your ShimmerFrameLayout and you're done!
ShimmerFrameLayout layout = (ShimmerFrameLayout) findViewById(R.id.shimmerlayout);
layout.startShimmerAnimation();


Read More: Facebook Shimmer Effect