Could you please add an option to auto start and stop the animations when the visibility changes i.e. start animations when View.VISIBLE otherwise stop animations (both INVISIBLE and GONE)?
I am trying to to manually start, stop and restart animations but I am getting a lot of NullPointerExceptions because of null ballPathAnimator. The animator is created in the onSizeChanged(...) and that method is not yet called when a Fragment's onResume() is called, thus NPE crash. Automatic start/stop will solve all this troubles. Thank you for this beautiful loading indicator.