install android studio

Facebook Shimmer in Android Studio

Shimmer:

Shimmer is the layout which shows the data is coming soon on this screen. This layout appears in the mean time difference between loading and data coming on this layout.

It is available by Facebook by downloading the facebook’s shimmer library in Android Studio. The Shimmer Effect can be shown on any screen.

implementation:

1. dependency:

compile 'com.facebook.shimmer:shimmer:0.1.0@aar'

2. ShimmerFrameLayout.xml:

com.facebook.shimmer.ShimmerFrameLayout
     android:id=“@+id/shimmer_view_container”
     android:layout_width=“wrap_content”
     android:layout_height="wrap_content"
     shimmer:duration="1000">
 
     View
        android:layout_width="100dp"
        android:layout_height="8dp"
        android:background="#dddddd" />
 

3. ShimmerAnimationFunction:

ShimmerFrameLayout shimmerContainer = (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container);
shimmerContainer.startShimmerAnimation();

Problem will be discussed in Comment section.

 

About the author

Generic Bytes

Hi! we are from Generic Bytes an aspiring bloggers with an obsession of things tech.This blog is dedicated to people who want to learn the technology.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *