diff --git a/shimmerlayout/src/main/java/io/supercharge/shimmerlayout/ShimmerLayout.java b/shimmerlayout/src/main/java/io/supercharge/shimmerlayout/ShimmerLayout.java index 868ac7e..ea5787b 100644 --- a/shimmerlayout/src/main/java/io/supercharge/shimmerlayout/ShimmerLayout.java +++ b/shimmerlayout/src/main/java/io/supercharge/shimmerlayout/ShimmerLayout.java @@ -129,6 +129,7 @@ public void startShimmerAnimation() { } if (getWidth() == 0) { + getViewTreeObserver().removeOnPreDrawListener(startAnimationPreDrawListener); startAnimationPreDrawListener = new ViewTreeObserver.OnPreDrawListener() { @Override public boolean onPreDraw() {