Closed billyjoker closed 4 years ago
There is the repeatDelay
attribute/property that controls this. Another thing to look out for is views that have a large width that extend beyond the screen's dimensions. A shimmer will always cover the entire width of a view.
You were right, it was related with the size that the shimmer had to cover. I did some changes and it works as expected. Thanks!
repeat_delay attribute is not working for me. Can you please help. The issue i'm facing is, when i add 'shimmer_repeat_delay' attribute, current animation speed is being affected instead of adding delay after current animation.
Following is the code i'm using
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shimmer_auto_start="true"
app:shimmer_base_alpha="1"
app:shimmer_base_color="@android:color/holo_orange_dark"
app:shimmer_duration="1500"
app:shimmer_highlight_alpha="0.6"
app:shimmer_highlight_color="@color/white"
app:shimmer_repeat_delay="3000"
app:shimmer_repeat_mode="restart"
app:shimmer_shape="linear"
app:shimmer_tilt="-45">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/holo_orange_dark"
android:padding="16dp"
android:text="Pradeep Kumar Reddy"
android:textColor="@color/white" />
</com.facebook.shimmer.ShimmerFrameLayout>
Hi the animation works right, but i see that when the animation ends it has a significant delay until it starts again to animate. So it seems to be freezed for a time before it starts again.
I have not figured out yet how to start quickly again, i've tried to change the animation speed but is not the point to be faster.