I've got a NPE when updating the visibility of LoadingDots to Visible.
Stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.animation.ValueAnimator.isRunning()' on a null object reference at com.eyalbira.loadingdots.LoadingDots.startAnimationIfAttached(LoadingDots.java:167) at com.eyalbira.loadingdots.LoadingDots.setVisibility(LoadingDots.java:148)
I have LoadingDots_auto_play=false. I checked the code and found the issue here:
private void startAnimationIfAttached() { if (mIsAttachedToWindow && !mAnimation.isRunning()) { mAnimation.start(); } }
It seems that mAnimation is null when autoplay is false. You've added check whether mAnimation is null anywhere you are invoking methods on it but here :)
I've got a NPE when updating the visibility of LoadingDots to Visible.
Stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.animation.ValueAnimator.isRunning()' on a null object reference at com.eyalbira.loadingdots.LoadingDots.startAnimationIfAttached(LoadingDots.java:167) at com.eyalbira.loadingdots.LoadingDots.setVisibility(LoadingDots.java:148)I have
LoadingDots_auto_play=false. I checked the code and found the issue here:private void startAnimationIfAttached() { if (mIsAttachedToWindow && !mAnimation.isRunning()) { mAnimation.start(); } }It seems that
mAnimationis null when autoplay is false. You've added check whether mAnimation is null anywhere you are invoking methods on it but here :)