-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException on ValueAnimator #5
Comments
can reproduce exactly the same crash. |
I am having the exact same problem. I worked around by just having autoplay as |
i am also getting similer kind of crash java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.animation.ValueAnimator.isRunning()' on a null object reference |
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 :)The text was updated successfully, but these errors were encountered: