3

I'm using Facebook ShimmerFrameLayout in my app. But It is not rendering correctly after upgrading from v0.1.0 to v0.5.0. It is showing a gray color box instead of actual elements inside the layout. Does anyone know any reason for that and any possible fixes for this issue?

I have inserted the ShimmerFrameLayout to my layout file as below.

<com.facebook.shimmer.ShimmerFrameLayout
    android:id="@+id/placeholder"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:alpha="0.8"
    android:elevation="5dp"
    app:shimmer_duration="1000"
    app:layout_constraintBottom_toBottomOf="@id/stat_container"
    app:layout_constraintEnd_toEndOf="@id/stat_container"
    app:layout_constraintStart_toStartOf="@id/stat_container"
    app:layout_constraintTop_toTopOf="@id/stat_container">

    <include layout="@layout/placeholder_stat" />
</com.facebook.shimmer.ShimmerFrameLayout>

in build.gradle file;

dependencies {
    ...
    implementation 'com.facebook.shimmer:shimmer:0.5.0@aar'
    ...
}

Design View Preview with ShimmerFrameLayout v0.1.0 preview with v0.1.0

Design View Preview with ShimmerFrameLayout v0.5.0 preview with v0.5.0

Chathura Buddhika
  • 2,067
  • 1
  • 21
  • 35

0 Answers0