Android Design: Best Way To Show Progress using Shimmer Effect

Anurag Dhunna
Mar 12, 2018 · 2 min read
Image for post
Image for post

In this post I will show you how you can make your android app design beautiful by adding Shimmer Effect.

Shimmer effect was created by Facebook to indicate a loading status, so instead of using ProgressBar or usual loader use Shimmer for a better design and user interface. They also open-sourced a library called Shimmer both for Android and iOS so that every developer could use it for free.

Great Design is key to get Big Customer Bank.

Steps:

Add Shimmer Library to build.gradle :

colors.xml

dimens.xml

Now create a new layout ‘data_placeholder_layout.xml’. This layout will act as a placeholder view until the data is not loaded from the API.

Now, as the placeholder view is ready add it to the activity layout(activity_data.xml).

Note: I have created an activity: DataActivity.java, activity_data.xml

We will add the placeholder 6–7 so it will imitate as a list.

Note: Please check all the comments in Code for better understanding.

In DataActivity.java start the Shimmer animation by calling startShimmerAnimation() method.

We will call this method on activity’s onResume() and onPause() methods in order to start and stop shimmer effect’s animation.

I have user Retrofit Client for fetching the data from API.

Image for post
Image for post
OUPUT

If you have any query or want more explanation please comment below.

Before you go…

If you liked ❤ this article, please hit 👏 clap.

Please check out my other work on Android

If you know someone who might extract value please share. I’ll be looking for your opinion and suggestions in the comments, feedback is always welcome.

Check out all the top articles at blog.mindorks.com

MindOrks

Our community publishes stories worth reading on Android…

Anurag Dhunna

Written by

Android, Java Software Developer. I write about technologies that I used in the journey of programming. Email: anurag.dhunna@gmail.com

MindOrks

MindOrks

Our community publishes stories worth reading on Android Development

Anurag Dhunna

Written by

Android, Java Software Developer. I write about technologies that I used in the journey of programming. Email: anurag.dhunna@gmail.com

MindOrks

MindOrks

Our community publishes stories worth reading on Android Development

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store