Posts

Showing posts with the label shimmer

Shimmer Layout like Facebook in Android - Kotlin

Image
While loading data from API, we used to show boring loaders. But in Facebook's app, one loading screen will be displayed. That one looks interesting know. We can also do that shimmer effect in our Andorid App using Shimmer library by Facebook. Let's start. Implementation: build.gradle Include the following in app-level gradle file. implementation 'com.facebook.shimmer:shimmer:0.1.0' colors.xml Include the following color in values -> colors.xml <color name= "placeholder_color" > #dddddd </color> Design: 1. First we have to design placeholder layout that is similar to your RecyclerView's adapter layout. placeholder.xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" android:layout_width...