Android Design: Best Way To Show Progress using Shimmer Effect
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.
Add Shimmer Library to build.gradle :
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.
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…
Android: Perfect Way to Create Splash Screen
Splash Screen is often referred to a welcome screen or user’s first experience of an application. There are many ways…
Android: Multiple Click Actions on Single Text View
My Task was to show ‘User Name’ , ‘status’ and ‘Song Name’ in a single line.
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