How to slow down the speed of shimmer effect
You need to use app:shimmer_duration="1500"
to set speed of animation in ShimmerFrameLayout
Try this
<com.facebook.shimmer.ShimmerFrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:shimmer_duration="1500">
<View
android:layout_width="100dp"
android:layout_height="8dp"
android:background="#dddddd" />
</com.facebook.shimmer.ShimmerFrameLayout>
Add app:duration="1500"
to shimmer FrameLayout
by default its duration is 1000 so to slow down i increase the duration
<com.facebook.shimmer.ShimmerFrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorAccent"
app:duration="1500"
android:id="@+id/shimmer">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#fff"
android:layout_gravity="center"
android:textSize="30dp"
android:text="Shimmer Effect"/>
</com.facebook.shimmer.ShimmerFrameLayout>
Try defining app:shimmer_duration
in XML.
e.g. app:shimmer_duration="1000"